From 2de64b733c771671385e9f6bba6ce1a753e2f679 Mon Sep 17 00:00:00 2001 From: Steve Pryde Date: Mon, 29 Jul 2024 19:55:31 +0930 Subject: [PATCH] Level 5 --- assets/level5.tmx | 87 +++++++++++++++++++++++++++++++---------- src/game/spawn/level.rs | 19 ++++++++- 2 files changed, 84 insertions(+), 22 deletions(-) diff --git a/assets/level5.tmx b/assets/level5.tmx index 7b9753e..eb7f461 100644 --- a/assets/level5.tmx +++ b/assets/level5.tmx @@ -1,28 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,3,0,2,2,0,0,0,0, +0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0 diff --git a/src/game/spawn/level.rs b/src/game/spawn/level.rs index d2b28b8..6234518 100644 --- a/src/game/spawn/level.rs +++ b/src/game/spawn/level.rs @@ -88,7 +88,7 @@ pub struct StartNewGame; fn start_new_game(_trigger: Trigger, mut commands: Commands) { commands.init_resource::(); commands.init_resource::(); - commands.insert_resource(CurrentLevel(3)); + commands.insert_resource(CurrentLevel(4)); commands.trigger(FadeOut { duration: 0.5 }); commands.trigger(SpawnLevel); } @@ -295,6 +295,23 @@ impl Default for Levels { IVec2::new(3, 8), ], }, + Level { + map: "level5.tmx".to_string(), + size: IVec2::new(21, 21), + start_tile: IVec2::new(0, 0), + duckling_spawn_points: vec![ + IVec2::new(-5, -2), + IVec2::new(5, -2), + IVec2::new(-5, 1), + IVec2::new(5, 1), + IVec2::new(-9, 5), + IVec2::new(9, -5), + IVec2::new(1, 8), + IVec2::new(-2, -4), + IVec2::new(2, -4), + IVec2::new(3, 6), + ], + }, ], } }