master
GammelJAN 6 years ago
parent c3fd3da2ee
commit 7fc3194079

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -87,7 +87,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
roomAmount = d.getLevel()[0].getRooms().length;
level = 6;
level = 0;
roomPosX = roomAmount / 2;
roomPosY = roomAmount / 2;
@ -602,7 +602,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
}
}
if(keycode == Input.Keys.Q){
if(keycode == Input.Keys.E){
if(gs != null && gs.getIsLoading() == false){
d.getPlayer().useItem(d.getPlayer().getInv().getSelected());
}

@ -7,6 +7,7 @@ package com.dungeoncrawler.model;
import com.dungeoncrawler.model.entities.*;
import com.dungeoncrawler.model.items.Amulet;
import com.dungeoncrawler.model.items.Potion;
import com.dungeoncrawler.model.items.Key;
import java.util.ArrayList;
@ -229,10 +230,10 @@ public class DungeonGenerator {
tempItem = new Amulet(lvl);
break;
/*case 1:
temp = new Swordsman(xPos, yPos, lvl);
case 1:
tempItem = new Potion(lvl);
break;
*/
default:
tempItem = null;
}

@ -153,6 +153,8 @@ public class EntitySprite implements Comparable<EntitySprite> {
frames[1]++;
}
System.out.println(die);
sprites[0].setRegion(regions[0][0][frames[1]]);
updateFlip();
}

@ -27,8 +27,9 @@ public class MapGenerator {
TextureRegion[][][] allTiles;
TextureRegion[][] splitTiles;
Texture torchT;
Texture sword;
Texture amulet;
Texture key;
Texture potion;
public MapGenerator(Texture[] tiles){
allTiles = new TextureRegion[7][][];
@ -37,8 +38,9 @@ public class MapGenerator {
allTiles[i] = TextureRegion.split(tiles[i], 48, 48);
}
torchT = new Texture("sprites/torch.png");
sword = new Texture("sprites/amulet.png");
amulet = new Texture("sprites/amulet.png");
key = new Texture("sprites/key.png");
potion = new Texture("sprites/potion.png");
}
public Map generateMap(Dungeon d){
@ -333,9 +335,13 @@ public class MapGenerator {
case 0:
itemSprite = new AnimatedObject(key, 48, 48);
break;
case 1:
itemSprite = new AnimatedObject(potion, 48, 48);
break;
case 2:
itemSprite = new AnimatedObject(sword, 48, 48);
itemSprite = new AnimatedObject(amulet, 48, 48);
break;
}

@ -17,4 +17,4 @@ public class DesktopLauncher {
//config.addIcon("logo.png", Files.FileType.Internale);
new LwjglApplication(new Controller(), config);
}
}
}
Loading…
Cancel
Save