Skip to content

Commit

Permalink
Level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepryde committed Jul 29, 2024
1 parent 72de717 commit 2de64b7
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 22 deletions.
87 changes: 66 additions & 21 deletions assets/level5.tmx
Original file line number Diff line number Diff line change
@@ -1,28 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="21" height="21" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" name="Tileset1" tilewidth="32" tileheight="32" tilecount="7" columns="0">
<grid orientation="orthogonal" width="1" height="1"/>
<tile id="0">
<image source="tiles/tile0.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="1" name="collider" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="1">
<image source="tiles/tile1.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="4" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="2">
<image source="tiles/tile2.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="1" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="3">
<image source="tiles/tile3.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="1" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="4">
<image source="tiles/tile4.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="3" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="5">
<image source="tiles/tile5.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="1" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
<tile id="6">
<image source="tiles/tile6.png" width="32" height="32"/>
<objectgroup draworder="index" id="2">
<object id="2" name="collision" x="0" y="0" width="32" height="32"/>
</objectgroup>
</tile>
</tileset>
<layer id="1" name="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2,0,0,0,3,0,0,0,3,0,0,0,2,2,0,0,0,
0,0,2,2,0,0,3,0,3,3,0,3,3,0,3,0,0,2,2,0,0,
0,2,2,0,0,3,3,0,0,0,0,0,0,0,3,3,0,0,2,2,0,
2,2,3,0,0,0,3,3,3,3,3,3,3,3,3,0,0,0,0,2,2,
2,0,3,0,5,0,0,0,0,0,3,0,0,0,0,0,5,0,0,0,2,
2,0,3,0,5,5,5,0,7,7,7,7,7,0,5,5,5,0,3,0,2,
2,0,3,0,0,0,5,0,7,0,0,0,7,0,5,0,0,0,3,0,2,
2,0,3,0,5,0,0,0,7,0,6,0,0,0,0,0,5,0,3,0,2,
2,0,3,0,5,5,5,0,7,0,0,0,7,0,5,5,5,0,3,0,2,
2,0,3,0,0,0,5,0,0,0,6,0,7,0,5,0,0,0,3,0,2,
2,0,3,0,5,0,0,0,7,0,0,0,7,0,0,0,5,0,3,0,2,
2,0,3,0,5,5,5,5,7,7,7,7,7,5,5,5,5,0,3,0,2,
2,0,0,0,5,0,0,3,0,0,0,0,0,0,3,0,0,0,3,0,2,
2,2,0,0,0,0,0,3,0,3,3,0,3,0,3,0,3,3,3,2,2,
0,2,2,3,3,3,0,3,0,3,0,0,3,0,3,0,0,0,2,2,0,
0,0,2,2,0,0,0,3,3,3,0,3,3,3,3,0,0,2,2,0,0,
0,0,0,2,2,0,0,0,0,3,0,3,0,0,0,0,2,2,0,0,0,
0,0,0,0,2,2,0,3,0,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
</data>
</layer>
</map>
19 changes: 18 additions & 1 deletion src/game/spawn/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct StartNewGame;
fn start_new_game(_trigger: Trigger<StartNewGame>, mut commands: Commands) {
commands.init_resource::<OverallScore>();
commands.init_resource::<Levels>();
commands.insert_resource(CurrentLevel(3));
commands.insert_resource(CurrentLevel(4));
commands.trigger(FadeOut { duration: 0.5 });
commands.trigger(SpawnLevel);
}
Expand Down Expand Up @@ -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),
],
},
],
}
}
Expand Down

0 comments on commit 2de64b7

Please sign in to comment.