diff --git a/game/src/main/java/cz/jzitnik/client/game/ResourceManager.java b/game/src/main/java/cz/jzitnik/client/game/ResourceManager.java index b03cc3b..85c06ba 100644 --- a/game/src/main/java/cz/jzitnik/client/game/ResourceManager.java +++ b/game/src/main/java/cz/jzitnik/client/game/ResourceManager.java @@ -23,6 +23,14 @@ public class ResourceManager { ROOM2("rooms/2.png"), ROOM3("rooms/3.png"), ROOM4("rooms/4.png"), + ROOM5("rooms/5.png"), + ROOM6("rooms/6.png"), + ROOM7("rooms/7.png"), + ROOM8("rooms/8.png"), + ROOM9("rooms/9.png"), + ROOM10("rooms/10.png"), + ROOM11("rooms/11.png"), + ROOM12("rooms/12.png"), ROOM_FROZEN("rooms/frozen.png"), PLAYER_FRONT("player/front.png"), diff --git a/game/src/main/java/cz/jzitnik/client/utils/DependencyManager.java b/game/src/main/java/cz/jzitnik/client/utils/DependencyManager.java index 3e67869..8912c4a 100644 --- a/game/src/main/java/cz/jzitnik/client/utils/DependencyManager.java +++ b/game/src/main/java/cz/jzitnik/client/utils/DependencyManager.java @@ -18,6 +18,7 @@ import tools.jackson.databind.*; import tools.jackson.dataformat.yaml.YAMLFactory; import java.io.InputStream; +import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -48,7 +49,7 @@ public class DependencyManager extends InjectableValues { // Construct all classes for (Class clazz : classes) { - for (var constructor : clazz.getDeclaredConstructors()) { + for (Constructor constructor : clazz.getDeclaredConstructors()) { var paramTypes = constructor.getParameterTypes(); var params = new Object[paramTypes.length]; boolean suitable = true; diff --git a/game/src/main/resources/config/debugging.yaml b/game/src/main/resources/config/debugging.yaml index dcdc21d..b9021b2 100644 --- a/game/src/main/resources/config/debugging.yaml +++ b/game/src/main/resources/config/debugging.yaml @@ -1,3 +1,3 @@ -renderColliders: false -renderPlayerCollider: false -showPlayerCordsLogs: false \ No newline at end of file +renderColliders: true +renderPlayerCollider: true +showPlayerCordsLogs: true \ No newline at end of file diff --git a/game/src/main/resources/setup/rooms.yaml b/game/src/main/resources/setup/rooms.yaml index d8abc62..8690026 100644 --- a/game/src/main/resources/setup/rooms.yaml +++ b/game/src/main/resources/setup/rooms.yaml @@ -3,7 +3,15 @@ # Intro NPC explains the goal + starter chest # ========================= - id: "spawn" - texture: "ROOM1" + texture: "ROOM11" + colliders: + - start: { x: 76, y: 45 } + end: { x: 155, y: 67 } + - start: { x: 40, y: 160 } + end: { x: 70, y: 190 } + - start: { x: 150, y: 160 } + end: { x: 185, y: 190 } + mobs: - type: "dialog" texture: "OLD_MAN" @@ -27,22 +35,8 @@ text: "He will give you the key to the final gate." onEnd: { type: end } - objects: - - objectType: "chest" - cords: { x: 120, y: 50 } - items: - - id: 100 - name: "Rusty Sword" - type: { name: "weapon_sword", dealDamage: 2 } - texture: "RUSTY_SWORD" - - id: 101 - name: "Apple" - type: { name: "food", addHealth: 2 } - texture: "APPLE" - west: "empty_a" east: "truhlaright" - north: "filler_entrance_north" south: null @@ -51,26 +45,12 @@ # LOOT ROOM 1 # ========================= - id: "truhlaright" - texture: "ROOM1" - objects: - - objectType: "chest" - cords: { x: 140, y: 45 } - items: - - id: 1 - name: "Dagger" - type: { name: "weapon_sword", dealDamage: 2, attackCooldownMs: 300 } # TODO: Make it dagger - texture: "DAGGER" - - id: 2 - name: "Bread" - type: { name: "food", addHealth: 3 } - texture: "BREAD" - - id: 9 - name: "Shiny Rock" - type: { name: "junk" } - texture: "ROCK" + texture: "ROOM5" colliders: - - start: { x: 140, y: 45 } - end: { x: 180, y: 67 } + - start: { x: 90, y: 100 } + end: { x: 140, y: 145 } + - start: { x: 40, y: 70 } + end: { x: 80, y: 100 } west: "spawn" east: "filler_1" north: "klicnik" @@ -80,11 +60,11 @@ # KEY KEEPER (QUEST NPC) # ========================= - id: "klicnik" - texture: "ROOM1" + texture: "ROOM10" mobs: - type: "dialog" texture: "KEY_KEEPER" - cords: { x: 100, y: 100 } + cords: { x: 90, y: 60 } collider: start: { x: 0, y: 52 } end: { x: 44, y: 78 } @@ -120,7 +100,7 @@ # BOSS ROOM # ========================= - id: "boss" - texture: "ROOM1" + texture: "ROOM3" mobs: - type: "hittable_drops" texture: "CAVE_BEAST" @@ -153,7 +133,7 @@ # FINAL ROOM / EXIT # ========================= - id: "final_room" - texture: "ROOM1" + texture: "ROOM6" requirement: item: "quest_item_final_key" #objects: @@ -170,7 +150,7 @@ # COMBAT FILLER A (zombie) # ========================= - id: "empty_a" - texture: "ROOM1" + texture: "ROOM7" mobs: - type: "hittable_drops" texture: "ZOMBIE" @@ -226,7 +206,7 @@ # LOOT ROOM 2 # ========================= - id: "truhlarightright" - texture: "ROOM1" + texture: "ROOM2" objects: - objectType: "chest" cords: { x: 100, y: 45 } @@ -253,7 +233,7 @@ # EXTRA FILLER ROOMS (maze / dead ends) # ========================= - id: "filler_1" - texture: "ROOM1" + texture: "ROOM3" west: "truhlaright" east: "filler_1b" north: null @@ -261,34 +241,34 @@ - id: "filler_1b" texture: "ROOM1" - west: "filler_1" + west: "filler_7" east: null north: null south: null - id: "filler_2" - texture: "ROOM1" + texture: "ROOM7" west: null east: "empty_a" north: "filler_loop_1" south: null - id: "filler_loop_1" - texture: "ROOM1" + texture: "ROOM4" west: null east: null north: "filler_loop_2" south: "filler_2" - id: "filler_loop_2" - texture: "ROOM1" + texture: "ROOM3" west: "filler_loop_3" east: null north: null south: "filler_loop_1" - id: "filler_loop_3" - texture: "ROOM1" + texture: "ROOM2" west: null east: "filler_loop_2" north: null @@ -302,21 +282,21 @@ south: null - id: "filler_k_west" - texture: "ROOM1" + texture: "ROOM4" west: "filler_k_west_2" east: "klicnik" north: null south: null - id: "filler_k_west_2" - texture: "ROOM1" + texture: "ROOM3" west: null east: "filler_k_west" north: null south: null - id: "filler_boss_west" - texture: "ROOM1" + texture: "ROOM2" west: null east: "boss" north: null @@ -330,36 +310,22 @@ south: null - id: "filler_rr_east" - texture: "ROOM1" + texture: "ROOM4" west: "truhlarightright" east: null north: null south: null - id: "filler_south_1" - texture: "ROOM1" + texture: "ROOM3" west: null east: null north: "truhlaright" south: "filler_south_2" - id: "filler_south_2" - texture: "ROOM1" + texture: "ROOM2" west: null east: null north: "filler_south_1" - south: null - -- id: "filler_entrance_north" - texture: "ROOM1" - west: null - east: "filler_north_2" - north: null - south: "spawn" - -- id: "filler_north_2" - texture: "ROOM1" - west: "filler_entrance_north" - east: null - north: null - south: null + south: null \ No newline at end of file diff --git a/game/src/main/resources/textures/rooms/10.png b/game/src/main/resources/textures/rooms/10.png new file mode 100644 index 0000000..2c6c210 Binary files /dev/null and b/game/src/main/resources/textures/rooms/10.png differ diff --git a/game/src/main/resources/textures/rooms/11.png b/game/src/main/resources/textures/rooms/11.png new file mode 100644 index 0000000..c101f03 Binary files /dev/null and b/game/src/main/resources/textures/rooms/11.png differ diff --git a/game/src/main/resources/textures/rooms/12.png b/game/src/main/resources/textures/rooms/12.png new file mode 100644 index 0000000..7082240 Binary files /dev/null and b/game/src/main/resources/textures/rooms/12.png differ diff --git a/game/src/main/resources/textures/rooms/5.png b/game/src/main/resources/textures/rooms/5.png new file mode 100644 index 0000000..9815947 Binary files /dev/null and b/game/src/main/resources/textures/rooms/5.png differ diff --git a/game/src/main/resources/textures/rooms/6.png b/game/src/main/resources/textures/rooms/6.png new file mode 100644 index 0000000..95b74b2 Binary files /dev/null and b/game/src/main/resources/textures/rooms/6.png differ diff --git a/game/src/main/resources/textures/rooms/7.png b/game/src/main/resources/textures/rooms/7.png new file mode 100644 index 0000000..f1b486d Binary files /dev/null and b/game/src/main/resources/textures/rooms/7.png differ diff --git a/game/src/main/resources/textures/rooms/8.png b/game/src/main/resources/textures/rooms/8.png new file mode 100644 index 0000000..c93bed8 Binary files /dev/null and b/game/src/main/resources/textures/rooms/8.png differ diff --git a/game/src/main/resources/textures/rooms/9.png b/game/src/main/resources/textures/rooms/9.png new file mode 100644 index 0000000..2a66bb4 Binary files /dev/null and b/game/src/main/resources/textures/rooms/9.png differ