public void Execute()
 {
     if (side.TopOrLeft is Fireball)
     {
         Fireball fb = (Fireball)side.TopOrLeft;
         fb.collisionEnemy = true;
         goomba.BeFlipped();
         Game.st.DefeatGoomba();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.Goomba, goomba.Location);
     }
     else if (side.BottomOrRight is Fireball)
     {
         Fireball fb = (Fireball)side.BottomOrRight;
         fb.collisionEnemy = true;
         goomba.BeFlipped();
         Game.st.DefeatGoomba();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.Goomba, goomba.Location);
     }
     else
     {
         goomba.Physics.YVelocity = 0;
         MoveGoomba();
     }
 }
Beispiel #2
0
 public void Execute()
 {
     if (Koopa.Health == KoopaStateMachine.KoopaHealth.Shelled && Koopa.Physics.IsMovingX())
     {
         Goomba.BeFlipped();
         Game.st.KoopaFire();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.KoopaFire, Goomba.Location);
     }
     StackEnemies();
 }
Beispiel #3
0
 public void Execute()
 {
     if (block.State.BumpingBlock)
     {
         goomba.BeFlipped();
         Game.st.DefeatGoomba();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.Goomba, goomba.Location);
         return;
     }
     goomba.Physics.YVelocity = 0;
     MoveGoomba();
 }
 public void Execute()
 {
     if (Koopa.Health == KoopaStateMachine.KoopaHealth.Shelled && Koopa.Physics.IsMovingX())
     {
         Goomba.BeFlipped();
         Game.st.DefeatGoomba();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.Goomba, Goomba.Location);
     }
     else
     {
         MoveEnemies();
         Koopa.ChangeDirection();
         Goomba.ChangeDirection();
     }
 }
 public void Execute()
 {
     Mario.marioCanTransition         = false;
     Mario.marioCanTransitionLeftPipe = false;
     if (Mario is StarMario)
     {
         Goomba.BeFlipped();
         Game.st.DefeatGoomba();
         ScoreAssignments sa = new ScoreAssignments();
         Game.UI.DisplayScore(sa.Goomba, Goomba.Location);
         Game.RumbleHelper.Rumble(PlayerIndex.One, Game.RumbleHelper.LowRumble, Game.RumbleHelper.LowRumble, Game.RumbleHelper.QuickRumble);
     }
     else
     {
         Mario.TakeDamage();
         Game.RumbleHelper.Rumble(PlayerIndex.One, Game.RumbleHelper.MidRumble, Game.RumbleHelper.MidRumble, Game.RumbleHelper.ShortRumble);
     }
 }
Beispiel #6
0
        public void Execute()
        {
            Mario.marioCanTransition         = false;
            Mario.marioCanTransitionLeftPipe = false;
            if (Mario is StarMario)
            {
                Goomba.BeFlipped();
            }
            else
            {
                Mario.SetPosition(new Vector2(Mario.Location.X, Mario.Location.Y
                                              - Side.Collision.Height));
                MarioSoundBoard.Instance.PlayMarioStomp();
                Mario.Physics.YVelocity = PhysicsUtilites.PlayerBumpVelocityY;
                Goomba.BeStomped();
            }

            Game.RumbleHelper.Rumble(PlayerIndex.One, Game.RumbleHelper.LowRumble, Game.RumbleHelper.LowRumble, Game.RumbleHelper.QuickRumble);
            Game.st.DefeatGoomba();
            ScoreAssignments sa = new ScoreAssignments();

            Game.UI.DisplayScore(sa.Goomba, Goomba.Location);
        }