public void Execute() { SoundEffectFactory.Kick(); if (projectile.ReturnProjectileType().Equals(ProjectileType.Fireball)) { ((Mario)((Fireball)projectile).GetOwner()).ProjectileScoreEvent(enemy.ScoreData()); enemy.TakeDamage(((Mario)((Fireball)projectile).GetOwner())); ((Fireball)projectile).Killed(); } else if (projectile.ReturnProjectileType().Equals(ProjectileType.Iceball)) { ((Mario)((Iceball)projectile).GetOwner()).ProjectileScoreEvent(enemy.ScoreData()); enemy.Freeze(); ((Iceball)projectile).Killed(); } }
public void Execute() { SoundEffectFactory.Stomp(); ((Mario)mario).ScoreEvent(enemy.ScoreData()); enemy.TakeDamage(mario); ((Mario)mario).BounceOff(); }