class Shield : AbstractRole, Alien, Human, Bounces { override fun tick() { } override fun hit() { actor.event( "hit" ) actor.role = Dying() } override fun bounce( impact : double ) { // Have we been hit hard enough to be destroyed? if (impact > 0.5) { actor.role = Dying() } } }