Skip to content

Commit

Permalink
Health bar
Browse files Browse the repository at this point in the history
  • Loading branch information
rpruizc committed Sep 13, 2020
1 parent 29ebe66 commit fbff011
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/world.rs
Original file line number Diff line number Diff line change
@@ -146,6 +146,10 @@ impl World {
self.spatial_table.coord_of(entity)
}

pub fn hit_points(&self, entity: Entity) -> Option<HitPoints> {
self.components.hit_points.get(entity).cloned()
}

pub fn is_living_character(&self, entity: Entity) -> bool {
self.spatial_table.layer_of(entity) == Some(Layer::Character)
}

0 comments on commit fbff011

Please sign in to comment.