Merge branch 'Jan'

aöldskfjaöds
master
Jonathan Hager 6 years ago
commit bcaf190247

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 44 KiB

@ -18,6 +18,13 @@ public class Inventory {
public void addItem(Item i)
{
for(int n = 2; n < items.length; n++){
if(i.getId() == 2){
if(items[1] == null){
items[1] = i;
n = items.length + 1;
break;
}
}
if(items[n] == null){
items[n] = i;
n = items.length + 1;

@ -297,17 +297,19 @@ public class GameScreen {
entitySprites[i].draw(batch);
entitySprites[i].setX(e[i].getxPos());
entitySprites[i].setY(e[i].getyPos());
if(e[i].getHp() < e[i].getMaxhp() && e[i].getHp() > 0){
healthBar = new Texture("sprites/halfHealthEntity.png");
Sprite healthBarSprite = new Sprite(healthBar);
healthBarSprite.setPosition(e[i].getxPos(), e[i].getyPos());
healthBarSprite.draw(batch);
}
else if(e[i].getHp() == e[i].getMaxhp()){
healthBar = new Texture("sprites/fullHealthEntity.png");
Sprite healthBarSprite = new Sprite(healthBar);
healthBarSprite.setPosition(e[i].getxPos(), e[i].getyPos());
healthBarSprite.draw(batch);
if(e[i].getId() != 2){
if(e[i].getHp() < e[i].getMaxhp() && e[i].getHp() > 0){
healthBar = new Texture("sprites/halfHealthEntity.png");
Sprite healthBarSprite = new Sprite(healthBar);
healthBarSprite.setPosition(e[i].getxPos(), e[i].getyPos());
healthBarSprite.draw(batch);
}
else if(e[i].getHp() == e[i].getMaxhp()){
healthBar = new Texture("sprites/fullHealthEntity.png");
Sprite healthBarSprite = new Sprite(healthBar);
healthBarSprite.setPosition(e[i].getxPos(), e[i].getyPos());
healthBarSprite.draw(batch);
}
}
}
}
@ -352,7 +354,7 @@ public class GameScreen {
entitySprites[i].setY(e[i].getyPos());
}
if(e[i].getId() == 2){
Texture tx = new Texture("sprites/sword.png");
Texture tx = new Texture("sprites/arrow.png");
//swordsmanRegions = TextureRegion.split(entityTextures[i], 48, 48);
entitySprites[i] = new Sprite(tx);
entitySprites[i].setX(e[i].getxPos());

@ -0,0 +1,25 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.dungeoncrawler.view;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.GL20;
/**
*
* @author bfz
*/
public class MenuScreen{
public MenuScreen() {
}
}
Loading…
Cancel
Save