Esempio n. 1
0
 private void UpdateAnimation(GameTime gameTime)
 {
     if (!mLeft && !mRight)
     {
         mAnimationManager.ChangeSequence("Idle");
     }
     else
     {
         if (mLeft)
         {
             mAnimationManager.ChangeSequence("MoveLeft");
         }
         if (mRight)
         {
             mAnimationManager.ChangeSequence("MoveRight");
         }
     }
     mAnimationManager.Update(gameTime);
 }
Esempio n. 2
0
        private void UpdateAnimation(GameTime gameTime)
        {
            switch (mMoveState)
            {
            case MoveState.IDLE:
                mAnimationManager.ChangeSequence("Idle");
                break;

            case MoveState.LEFT:
                mAnimationManager.ChangeSequence("SideMove");
                break;

            case MoveState.RIGHT:
                mAnimationManager.ChangeSequence("SideMove");
                break;

            default:
                break;
            }
            mAnimationManager.Update(gameTime);
        }