From 15c7f5c0fcc60ff066019460c305a63d35781142 Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Wed, 15 Nov 2023 22:34:46 -0800 Subject: [PATCH] and the color inconsistency --- src/display2d.rs | 2 +- src/display3d.rs | 2 +- src/game.rs | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/display2d.rs b/src/display2d.rs index 2cdce72..697dc32 100644 --- a/src/display2d.rs +++ b/src/display2d.rs @@ -35,7 +35,7 @@ impl Plugin for Display2dPlugin { set_transform .after(game::update_board) .run_if(any_component_changed::), - set_piece_sprite.run_if(any_component_changed::), + set_piece_sprite.run_if(any_component_changed::).after(game::set_side), set_tile_sprite.run_if(any_component_added::), ), ) diff --git a/src/display3d.rs b/src/display3d.rs index f130f17..0480f16 100644 --- a/src/display3d.rs +++ b/src/display3d.rs @@ -35,7 +35,7 @@ impl Plugin for Display3dPlugin { set_board_model.run_if(any_component_added::), set_tile_hitbox.run_if(any_component_added::), set_piece_position.run_if(any_component_changed::), - set_piece_texture.run_if(any_component_changed::), + set_piece_texture.run_if(any_component_changed::).after(game::set_side), select .run_if(in_state(GameState::Play)) .run_if(in_state(DisplayState::Display3d)) diff --git a/src/game.rs b/src/game.rs index e42c506..c3da7e7 100644 --- a/src/game.rs +++ b/src/game.rs @@ -30,13 +30,13 @@ impl Plugin for GamePlugin { .run_if(any_component_added::), ), ) - // .add_systems( - // PreUpdate, - // ( - // asserts::, - // asserts::, - // ), - // ) + .add_systems( + PreUpdate, + ( + asserts::, + asserts::, + ), + ) .add_systems( PostUpdate, (debug_board.run_if(resource_exists::()),),