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(); } }
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(); } }
public override void BumpTransition() { CurrentState.BumpTransition(); ExitState(); }