mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-11-16 10:52:44 +00:00
Add damage amount display when taking fatal damage
Fix doukutsu-rs/doukutsu-rs#163
This commit is contained in:
parent
3fbe94ecd1
commit
6e9fe76cf9
|
@ -939,7 +939,13 @@ impl Player {
|
||||||
|
|
||||||
impl GameEntity<&NPCList> for Player {
|
impl GameEntity<&NPCList> for Player {
|
||||||
fn tick(&mut self, state: &mut SharedGameState, npc_list: &NPCList) -> GameResult {
|
fn tick(&mut self, state: &mut SharedGameState, npc_list: &NPCList) -> GameResult {
|
||||||
if !self.cond.alive() {
|
if !self.cond.alive() && self.life > 0 {
|
||||||
|
return Ok(());
|
||||||
|
} else if !self.cond.alive() && self.life == 0 {
|
||||||
|
self.popup.x = self.x;
|
||||||
|
self.popup.y = self.y - self.display_bounds.top as i32 + 0x1000;
|
||||||
|
self.popup.tick(state, ())?;
|
||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue