render main player's hand
This commit is contained in:
parent
30d19ed9d9
commit
314c3299ef
8 changed files with 134 additions and 97 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use bevy::prelude::*;
|
||||
use bevy::{ecs::relationship::RelationshipSourceCollection, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game::{player::Player /* wall::WallTiles */},
|
||||
|
|
@ -18,12 +18,11 @@ pub struct Hand;
|
|||
|
||||
pub(crate) fn sort_hands(
|
||||
tiles: Populated<&Tile>,
|
||||
mut hands: Populated<&mut Children, (With<Player>, Changed<Hand>)>,
|
||||
mut hands: Populated<&mut Children, (Changed<Hand>, Without<Player>)>,
|
||||
) -> Result {
|
||||
for mut hand in hands {
|
||||
hand.sort_unstable_by_key(|e| tiles.get(*e).unwrap().suit);
|
||||
debug!("sorted: {hand:?}")
|
||||
debug!("sorted: {hand:?}");
|
||||
}
|
||||
trace!("sort_hands");
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue