Example #1
0
 public Mario(int locX, int locY)
 {
     Small         = true;
     Fire          = false;
     Ice           = false;
     FacingRight   = true;
     Star          = false;
     canFire       = true;
     canIce        = true;
     transitioning = false;
     Location      = new Vector2(locX, locY);
     State         = new MarioStill(this);
     moveMario     = true;
     rigidbody     = new ControllablePhysicsObject();
     takingDamage  = 0;
     LoadPhysicsProperties();
     lives                 = new PlayerScoreItem(PlayerScoreItem.GUIType.mario, UtilityClass.StartingLives, UtilityClass.GUIMarioPosition, false);
     points                = new PlayerScoreItem(UtilityClass.GUIMarioScoreName, UtilityClass.zero, UtilityClass.GUIMarioScorePosition, true);
     coins                 = new PlayerScoreItem(PlayerScoreItem.GUIType.coin, UtilityClass.zero, UtilityClass.GUIMarioCoinsPosition, true);
     transitionDuration    = UtilityClass.marioTransitionDuration;
     TransitionToBigTime   = UtilityClass.marioTransitionToBigTime;
     TransitionToFireTime  = UtilityClass.marioTransitionToFireTime;
     TransitionToIceTime   = UtilityClass.marioTransitionToIceTime;
     TransitionToSmallTime = UtilityClass.marioTransitionToSmallTime;
     stats                 = new PlayerStatManager();
     actions               = new PlayerActionStatManager();
 }
 public EndingSequenceMario(Mario mario, bool smallMario, bool fireMario, bool iceMario, TimeStat time)
 {
     this.location = mario.Location;
     endActions    = mario.actions;
     endStats      = mario.stats;
     timeStats     = time;
     timeStats.SaveTime();
     this.smallMario       = smallMario;
     endSequenceFinished   = false;
     atFlagpoleBottom      = false;
     flagAtBottom          = false;
     offBlock              = false;
     flagpoleAnimation     = true;
     fallOffBlockAnimation = false;
     walkingToCastle       = false;
     slideSpeed            = UtilityClass.slideSpeed;
     walkSpeed             = UtilityClass.endMarioWalkSpeed;
     decayRate             = UtilityClass.endMarioDecayRate;
     waitToLeaveFlagpole   = UtilityClass.waitToLeaveFlagpole;
     endMarioSprite        = new EndingSequenceMarioSprite(location, smallMario, fireMario, iceMario);
 }