示例#1
0
 public void Down()
 {
     if (!(MarioAnimatedState is MarioDeadState))
     {
         MarioAnimatedState.Down();
     }
 }
示例#2
0
 public void Idle()
 {
     if (!(MarioAnimatedState is MarioDeadState))
     {
         MarioAnimatedState.Idle();
         MarioPhysics.IsRunning = false;
     }
 }
示例#3
0
 public void Up()
 {
     if (!(MarioAnimatedState is MarioDeadState))
     {
         MarioPhysics.IsRunning = true;
         MarioAnimatedState.Up();
         MarioPhysics.Jump();
     }
 }
示例#4
0
 public void Right()
 {
     if (!(MarioAnimatedState is MarioDeadState))
     {
         MarioPhysics.IsRunning = true;
         MarioAnimatedState.Right();
         MarioPhysics.MoveRight();
     }
 }
示例#5
0
        public void Update(GameTime gameTime)
        {
            MarioAnimatedState.Update(gameTime);
            CheckDead();

            MarioPhysics.Update(gameTime);
            time += gameTime.ElapsedGameTime.TotalSeconds;
            if (time > delay)
            {
                action = true;
                time   = Constant.Constant.Instance.InitialTime;
            }
        }
示例#6
0
 public void Up()
 {
     if (!(MarioAnimatedState is MarioDeadState))
     {
         if (MarioPhysics.IsGround)
         {
             SoundFactory.Instance.CreateJumpSmallSound();
         }
         MarioPhysics.Jump();
         MarioAnimatedState.Up();
         MarioPhysics.IsGround = false;
     }
 }
示例#7
0
 public void Draw(SpriteBatch spriteBatch)
 {
     MarioAnimatedState.Draw(spriteBatch, MarioPhysics.Position);
 }