Ejemplo n.º 1
0
 public MarioStateMachine(Vector2 location, IMario parent)
 {
     Location     = location;
     maxXVelocity = standardVelocity;
     State        = new LittleMarioState();
     Sprite       = State.Sprite;
     Idle();
     Parent = parent;
 }
Ejemplo n.º 2
0
 public void ChangeToLittle()
 {
     //if Mario is big/fire adjust the y location to make up for texture size difference
     if (!(State is DeadMarioState) && !(State is LittleMarioState))
     {
         Location = new Vector2(Location.X, Location.Y + textureDifference);
     }
     State = new LittleMarioState();
 }