add lantern object and implement light management in player and environment
This commit is contained in:
@@ -148,6 +148,7 @@ public class GamePanel extends JPanel implements Runnable {
|
||||
}
|
||||
}
|
||||
for(Entity entity : iTile[currentMap.getIndex()]) if(entity != null) entity.update();
|
||||
eManager.update();
|
||||
break;
|
||||
case PAUSE:
|
||||
break;
|
||||
|
||||
@@ -194,7 +194,11 @@ public class UI {
|
||||
for(int i = 0; i < entity.inventory.size(); i++) {
|
||||
|
||||
// EQUIP CURSOR
|
||||
if(entity.inventory.get(i) == entity.currentWeapon || entity.inventory.get(i) == entity.currentShield) {
|
||||
if(
|
||||
entity.inventory.get(i) == entity.currentWeapon ||
|
||||
entity.inventory.get(i) == entity.currentShield ||
|
||||
entity.inventory.get(i) == entity.currentLight
|
||||
) {
|
||||
graphics2d.setColor(new Color(240, 190,90));
|
||||
graphics2d.fillRoundRect(slotX, slotY, panel.tileSize, panel.tileSize, 10, 10);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ public enum EntityType {
|
||||
PICKUP,
|
||||
PROJECTILE,
|
||||
WEAPON,
|
||||
LIGHT,
|
||||
SHIELD;
|
||||
|
||||
public enum WeaponType {
|
||||
|
||||
@@ -54,6 +54,11 @@ public class AssetSetter {
|
||||
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*17;
|
||||
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*21;
|
||||
i++;
|
||||
|
||||
panel.obj[Map.OVERWORLD.getIndex()][i] = new LanternObj(panel);
|
||||
panel.obj[Map.OVERWORLD.getIndex()][i].worldX = panel.tileSize*18;
|
||||
panel.obj[Map.OVERWORLD.getIndex()][i].worldY = panel.tileSize*20;
|
||||
i++;
|
||||
}
|
||||
|
||||
public void setNPC() {
|
||||
|
||||
Reference in New Issue
Block a user