Проектная работа - WIP
This commit is contained in:
@@ -8,11 +8,7 @@ pub fn print_all_entities(mut commands: Commands, query: Query<Entity>) {
|
||||
}
|
||||
|
||||
/// ДЛЯ ОТЛАДКИ - вывод всех сущностей мира по нажатию Enter
|
||||
pub fn print_all_entities_by_press_enter(
|
||||
input: Res<ButtonInput<KeyCode>>,
|
||||
mut commands: Commands,
|
||||
query: Query<Entity>,
|
||||
) {
|
||||
pub fn print_all_entities_by_press_enter(input: Res<ButtonInput<KeyCode>>, mut commands: Commands, query: Query<Entity>) {
|
||||
if input.just_pressed(KeyCode::Enter) {
|
||||
for entity in query {
|
||||
commands.entity(entity).log_components();
|
||||
@@ -28,9 +24,7 @@ pub struct Grid;
|
||||
pub fn spawn_grid(commands: &mut Commands) {
|
||||
use crate::domain::GRID_SIZE;
|
||||
|
||||
let grid = commands
|
||||
.spawn((Grid, Transform::default(), Visibility::default()))
|
||||
.id();
|
||||
let grid = commands.spawn((Grid, Transform::default(), Visibility::default())).id();
|
||||
|
||||
for x in -20..=20 {
|
||||
commands.spawn((
|
||||
|
||||
Reference in New Issue
Block a user