add BatMON and SkeletonLordMON; update AssetSetter to include new monsters and adjust player interaction

This commit is contained in:
2026-03-24 22:55:46 +01:00
parent e0fc6b2803
commit 3e4fe8f2bf
13 changed files with 266 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
package de.miaurizius.jgame2d.data;
import de.miaurizius.jgame2d.core.enums.Map;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -19,6 +21,7 @@ public class DataStorage implements Serializable {
int nextLevelExp;
int coins;
int worldX, worldY;
Map currentMap;
// PLAYER INVENTORY
List<String> itemNames = new ArrayList<>();

View File

@@ -44,6 +44,7 @@ public class SaveLoad {
ds.coins = panel.player.coins;
ds.worldX = panel.player.worldX;
ds.worldY = panel.player.worldY;
ds.currentMap = panel.currentMap;
// PLAYER INVENTORY
for(int i = 0; i < panel.player.inventory.size(); i++) {
@@ -95,7 +96,7 @@ public class SaveLoad {
panel.player.coins = ds.coins;
panel.player.worldX = ds.worldX;
panel.player.worldY = ds.worldY;
panel.currentMap = ds.currentMap;
// PLAYER INVENTORY
panel.player.inventory.clear();