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); }
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); }