mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-09-28 21:19:24 +00:00
Maybe this implementation would be better
This commit is contained in:
parent
f91e793062
commit
8992889e94
|
@ -939,12 +939,12 @@ 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() && self.life > 0 {
|
if !self.cond.alive() {
|
||||||
return Ok(());
|
if self.life == 0 {
|
||||||
} else if !self.cond.alive() && self.life == 0 {
|
self.popup.x = self.x;
|
||||||
self.popup.x = self.x;
|
self.popup.y = self.y - self.display_bounds.top as i32 + 0x1000;
|
||||||
self.popup.y = self.y - self.display_bounds.top as i32 + 0x1000;
|
self.popup.tick(state, ())?;
|
||||||
self.popup.tick(state, ())?;
|
}
|
||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue