Exemple #1
0
 public Mario(Game1 game, Vector2 position, int marioState, bool marioDirection)
 {
     myGame              = game;
     this.marioState     = marioState;
     this.marioDirection = marioDirection;
     marioAction         = MARIO_IDLE;
     this.position       = position;
     state             = new IdleMarioState(this);
     IsInvincible      = false;
     InvincibilityTime = 0;
     gravity           = GameConstants.Two * GameConstants.Two;
     bounce            = false;
     animated          = false;
     isVisible         = true;
 }
Exemple #2
0
 public Mario(Game1 game, Vector2 position)
 {
     myGame            = game;
     marioState        = MARIO_SMALL;
     prevMarioState    = marioState;
     marioDirection    = MARIO_LEFT;
     marioAction       = MARIO_IDLE;
     this.position     = position;
     IsInvincible      = false;
     HasStarPower      = false;
     canMove           = true;
     state             = new IdleMarioState(this);
     InvincibilityTime = 0;
     starCounter       = 0;
     scoreCounter      = 0;
     gravity           = GameConstants.Two * GameConstants.Two;
     bounce            = false;
     animated          = false;
     isVisible         = true;
     isScored          = false;
 }