generated from tipragot/rust
save
This commit is contained in:
parent
24ae64f2f3
commit
952048a9d4
|
@ -67,18 +67,37 @@ impl AdjacentsPositions {
|
|||
}
|
||||
}
|
||||
|
||||
/// TODO
|
||||
#[derive(Component)]
|
||||
struct AdjacentsLink {
|
||||
/// TODO
|
||||
top_left: Option<Entity>,
|
||||
/// TODO
|
||||
top_right: Option<Entity>,
|
||||
/// TODO
|
||||
bottom_left: Option<Entity>,
|
||||
/// TODO
|
||||
bottom_right: Option<Entity>,
|
||||
/// TODO
|
||||
left: Option<Entity>,
|
||||
/// TODO
|
||||
right: Option<Entity>,
|
||||
}
|
||||
|
||||
/// TODO
|
||||
fn create_adjacent_tiles(
|
||||
commands: &mut Commands,
|
||||
tile_pos: TilePosition,
|
||||
tiles: &mut HashMap<TilePosition, Entity>,
|
||||
new_tiles: &mut LinkedList<TilePosition>,
|
||||
) {
|
||||
let _entity = *tiles
|
||||
) -> Entity {
|
||||
let entity = *tiles
|
||||
.entry(tile_pos)
|
||||
.or_insert_with(|| commands.spawn((Tile, tile_pos)).id());
|
||||
|
||||
new_tiles.push_back(tile_pos);
|
||||
|
||||
entity
|
||||
}
|
||||
|
||||
fn test(mut commands: Commands, raduis: u32) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use bevy::prelude::*;
|
||||
|
||||
pub mod generation;
|
||||
pub mod scenes;
|
||||
|
||||
/// The current scene of the game.
|
||||
|
|
Loading…
Reference in a new issue