Fix bug in Health::kill that caused Destroy event to never be emitted by preemptively setting is_dead to true

This commit is contained in:
Imbris 2022-08-20 17:10:29 -04:00
parent 3b87bf1e4a
commit ca66a9f79b

View File

@ -195,10 +195,7 @@ impl Health {
pub fn should_die(&self) -> bool { self.current == 0 }
pub fn kill(&mut self) {
self.current = 0;
self.is_dead = true;
}
pub fn kill(&mut self) { self.current = 0; }
#[cfg(not(target_arch = "wasm32"))]
pub fn revive(&mut self) {