示例#1
0
 public void Reset()
 {
     ActionState = new MarioActionStateIdle(this, null);
     PowerState  = new MarioPowerStateNormal(this);
     ActionState.Enter();
     PowerState.Enter();
     Collidable = true;
     Velocity   = Vector2.Zero;
     ChangeFacing(1);
     OnGround = true;
     Falling  = false;
     lockDir  = 0;
 }
示例#2
0
 public Mario(Texture2D texture) : base(texture, EntityType.Mario)
 {
     CurrentTexture  = 0;
     CurrentFrame    = 0;
     dir             = 1;
     SourceRectangle = new Rectangle();
     ActionState     = new MarioActionStateIdle(this, null);
     ActionState.Enter();
     PowerState = new MarioPowerStateNormal(this);
     PowerState.Enter();
     lastChange             = 0;
     invincibleCurrentTime  = 0;
     Invincible             = false;
     sourceInvincibleChange = 0;
     lockDir     = 0;
     Order       = 0f;
     trackSprint = false;
 }