From 7382c404d004ba36414c271c46564df6b0bc85b6 Mon Sep 17 00:00:00 2001 From: Eren <2120548@stud.hs-mannheim.de> Date: Mon, 27 Mar 2023 18:52:34 +0200 Subject: [PATCH] Added cave sprites for cave theme --- project/data/sprites/sprites.json | 120 +++++++++++++++++++++++++++++- project/main.py | 4 +- 2 files changed, 121 insertions(+), 3 deletions(-) diff --git a/project/data/sprites/sprites.json b/project/data/sprites/sprites.json index 6fb6aa6..aab3a2b 100644 --- a/project/data/sprites/sprites.json +++ b/project/data/sprites/sprites.json @@ -305,6 +305,97 @@ } ] }, + { + "id": "cave_block", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_bottom", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_left", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_right", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_top", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_top_left", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, + { + "id": "cave_block_top_right", + "subsheets": [ + { + "id": "1", + "delays": [ + 1 + ], + "width": 12, + "height": 12 + } + ] + }, { "id": "ghost_character", "subsheets": [ @@ -321,7 +412,7 @@ "width": 24, "height": 36 }, - { + { "id": "idle_l", "delays": [ 20, @@ -430,5 +521,32 @@ "height": 16 } ] + }, + { + "id": "staubsauger", + "subsheets": [ + { + "id": "on", + "delays": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "width": 48, + "height": 36 + }, + { + "id": "off", + "delays": [ + 9 + ] + } + ] } ] \ No newline at end of file diff --git a/project/main.py b/project/main.py index 3e41d03..e3feb6f 100644 --- a/project/main.py +++ b/project/main.py @@ -18,7 +18,7 @@ from ui_elements.KeyManager import KeyManager from ui_elements.LevelMenu import LevelMenu from ui_elements.TextLabel import TextLabel -what_to_run = 'menu' +what_to_run = 'level' def apply_frame_rate(number: float): @@ -104,7 +104,7 @@ elif what_to_run == 'level': parsed_levels_manager.load_from_config('data/levels/levels.json') generated_level = LoadedLevel(sprite_manager, spritesheet_manager) - generated_level.load_level(parsed_levels_manager.levels[0]) + generated_level.load_level(parsed_levels_manager.levels[2]) ghost_character = PlayerSprite(spritesheet_manager.get_sheet("ghost_character")) ghost_character.position_scale = PositionScale((90, 50), (1, 1)) sprite_manager.add_ui_element(DrawLayers.OBJECTS, ghost_character)