public virtual bool HandleCollition(ICollitionHandler other) { if (other is IStaticDamageable damageable) { damageable.ReceiveStaticDamage(); } return(false); }
public override bool HandleCollition(ICollitionHandler other) { base.HandleCollition(other); health -= 20; if (health <= 0) { TGCGame.soundManager.PlaySound(TGCGame.content.S_Explotion.CreateInstance(), emitter); Destroy(); } return(false); }
public override bool HandleCollition(ICollitionHandler other) { if (!Destroyed) { if (other is XWing _) { Health -= 1000; } } return(false); }
public override bool HandleCollition(ICollitionHandler other) { if (!Destroyed) { if (other is TIE _) { Reiniciar(); } } return(false); }
public override bool HandleCollition(ICollitionHandler other) { if (!Destroyed) { if (other is ILaserDamageable damageable) { damageable.ReceiveLaserDamage(); } Destroy(); } return(false); }
internal void RegisterCollider(BodyHandle handle, ICollitionHandler handler) => collidersB.TryAdd(handle, handler);
internal void RegisterCollider(StaticHandle handle, ICollitionHandler handler) => collidersS.TryAdd(handle, handler);
public virtual bool HandleCollition(ICollitionHandler other) => !Destroyed;