mirror of
https://github.com/stevenhowes/GoRetro.git
synced 2026-05-26 15:53:31 +01:00
Allow easy killing (with animation) of anything that has a DR. Useful for plausibly disposing of projectiles.
This commit is contained in:
@@ -25,6 +25,9 @@ func (dr *damageReceiver) onDraw() error {
|
||||
}
|
||||
|
||||
func (dr *damageReceiver) onUpdate() error {
|
||||
if dr.container.Kill {
|
||||
dr.health = -1
|
||||
}
|
||||
// If we're out of health
|
||||
if dr.health <= 0 {
|
||||
// If we have an animator, run the destroy sequence
|
||||
|
||||
Reference in New Issue
Block a user