예제 #1
0
 public override void CollisionResponseSide(ICollidable collidable)
 {
     if (collidable is MarioModel && !HasCollided)
     {
         MarioModel marioModel = (MarioModel)collidable;
         RewardPointsByHeight(marioModel);
         CurrentState.BumpTransition();
         HasCollided = true;
         //Call Finalize Points
         ICommand com = new GoToCastleCommand(marioModel);
         com.Execute();
         winTime.Start();
     }
 }
예제 #2
0
 public override void CollisionResponseTop(ICollidable collidable)
 {
     if (collidable is MarioModel && !HasCollided)
     {
         //If mario hits top of flag, give an extra life
         MarioModel marioModel = (MarioModel)collidable;
         marioModel.lives++;
         CurrentState.BumpTransition();
         HasCollided = true;
         //Call Finalize Points
         ICommand com = new GoToCastleCommand(marioModel);
         com.Execute();
         winTime.Start();
     }
 }