public void HandleCollision(INpc enemy, IProjectile swordBeam, Constants.Direction side) { SwordBeamFlyingProjectile swordBeamCast = (SwordBeamFlyingProjectile)swordBeam; enemy.TakeDamage(swordBeamCast.DamageAmount()); swordBeamCast.ExplodeSword(); }
public void HandleCollision(IProjectile swordBeam, IBlock block, Constants.Direction side) { Type blockType = block.GetType(); if (blockType == typeof(TileWater) || blockType == typeof(SecretRoomWall)) { return; } SwordBeamFlyingProjectile swordBeamCast = (SwordBeamFlyingProjectile)swordBeam; swordBeamCast.ExplodeSword(); }