Add current level to HUD
This commit is contained in:
parent
5d22e4d1dc
commit
bcf373b84a
@ -30,10 +30,16 @@ pub fn hud(ecs: &SubWorld) {
|
||||
ColorPair::new(WHITE, RED),
|
||||
);
|
||||
|
||||
let player = <(Entity, &Player)>::query()
|
||||
let (player, map_level) = <(Entity, &Player)>::query()
|
||||
.iter(ecs)
|
||||
.find_map(|(entity, _player)| Some(*entity))
|
||||
.find_map(|(entity, player)| Some((*entity, player.map_level)))
|
||||
.unwrap();
|
||||
draw_batch.print_color_right(
|
||||
Point::new(SCREEN_WIDTH * 2, 1),
|
||||
format!("Dungeon Level: {}", map_level + 1),
|
||||
ColorPair::new(YELLOW, BLACK),
|
||||
);
|
||||
|
||||
let mut item_query = <(&Item, &Name, &Carried)>::query();
|
||||
let mut y = 3;
|
||||
item_query
|
||||
|
Loading…
x
Reference in New Issue
Block a user