big ass input system
This commit is contained in:
parent
81cb5c24d4
commit
a6079103a4
6 changed files with 73 additions and 44 deletions
|
|
@ -14,6 +14,18 @@ pub(crate) fn render_changed_hand(
|
|||
tiles: Populated<&Tile>,
|
||||
mut target: ResMut<RenderedHand>,
|
||||
) -> Result {
|
||||
let mut rendered = vec![];
|
||||
|
||||
for hand in hands {
|
||||
let hand_tiles = hand
|
||||
.iter()
|
||||
.map(|inhand| -> Result<_> { Ok(tiles.get(inhand).map(tiles::draw_tile)?) })
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
rendered.push(hand_tiles);
|
||||
}
|
||||
|
||||
target.0 = rendered;
|
||||
|
||||
trace!("render_changed_hand");
|
||||
|
||||
render_hand(hand, tiles, target)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue