-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor setup, player build into tilemap build, build wall, started …
…working on player movement with impassable tiles
- Loading branch information
1 parent
7ca26b4
commit 1af5201
Showing
8 changed files
with
171 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"./Cargo.toml", | ||
"./Cargo.toml", | ||
"./Cargo.toml", | ||
"./Cargo.toml", | ||
"./Cargo.toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use bevy::prelude::*; | ||
|
||
use crate::resources::AssetPack; | ||
|
||
pub fn select_asset_pack() -> AssetPack { | ||
// TODO: here test for the presence of the OneBitCanari asset pack | ||
// if absent, use the Free asset pack | ||
let free_asset_pack = AssetPack { | ||
name: "Free asset pack", | ||
tileset: "FreeAssetPack/RogueYun_SomethingBoxy.png", | ||
sprites: "FreeAssetPack/RogueYun_SomethingBoxy.png", | ||
}; | ||
|
||
return free_asset_pack; | ||
} | ||
|
||
pub fn game_setup( | ||
mut commands: Commands, | ||
asset_pack: Res<AssetPack>, | ||
asset_server: Res<AssetServer>, | ||
) { | ||
commands.spawn(Camera2dBundle::default()); | ||
|
||
for tilemap_metadata in crate::map::setup_tilemap_metadata(asset_pack).iter() { | ||
crate::map::build_tilemap(&mut commands, &asset_server, tilemap_metadata); | ||
} | ||
|
||
// player creation done in build_tilemap for TilemapMarker::CharactersTilemap | ||
} |