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
|
/// TODO
|
||||||
fn create_adjacent_tiles(
|
fn create_adjacent_tiles(
|
||||||
commands: &mut Commands,
|
commands: &mut Commands,
|
||||||
tile_pos: TilePosition,
|
tile_pos: TilePosition,
|
||||||
tiles: &mut HashMap<TilePosition, Entity>,
|
tiles: &mut HashMap<TilePosition, Entity>,
|
||||||
new_tiles: &mut LinkedList<TilePosition>,
|
new_tiles: &mut LinkedList<TilePosition>,
|
||||||
) {
|
) -> Entity {
|
||||||
let _entity = *tiles
|
let entity = *tiles
|
||||||
.entry(tile_pos)
|
.entry(tile_pos)
|
||||||
.or_insert_with(|| commands.spawn((Tile, tile_pos)).id());
|
.or_insert_with(|| commands.spawn((Tile, tile_pos)).id());
|
||||||
|
|
||||||
new_tiles.push_back(tile_pos);
|
new_tiles.push_back(tile_pos);
|
||||||
|
|
||||||
|
entity
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test(mut commands: Commands, raduis: u32) {
|
fn test(mut commands: Commands, raduis: u32) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
pub mod generation;
|
||||||
pub mod scenes;
|
pub mod scenes;
|
||||||
|
|
||||||
/// The current scene of the game.
|
/// The current scene of the game.
|
||||||
|
|
Loading…
Reference in a new issue