Beispiel #1
0
 public static void HandleGoombaCollision(IPlayer player, Goomba goomba, CollisionSide side)
 {
     if (player.IsInvincible)
     {
         goomba.BeFlipped();
         ScoreManager.CollectEnemyScore(goomba, false);
         SoundFactory.Instance.PlayKickEnemySound();
     }
     else
     {
         if (side == CollisionSide.Top)
         {
             goomba.BeStomped();
             ScoreManager.CollectEnemyScore(goomba, true);
             player.MovementState.Bounce();
             SoundFactory.Instance.PlayStompEnemySound();
         }
         else
         {
             player.TakeDamage();
         }
     }
 }
Beispiel #2
0
 public void BeStomped()
 {
     goomba.goombaState  = new GoombaStompedState(goomba);
     goomba.goombaAction = GOOMBA_DEAD;
     goomba.BeStomped();
 }