コード例 #1
0
        #pragma warning restore 0649

        public override MoveState GetState(HumanoidMoveStateMachine self, Vector3 moveInput)
        {
            MoveState state;

            if (self.isJumping)
            {
                state = jumpState;
            }
            else if (moveInput == Vector3.zero)
            {
                state = idleState;
            }
            else if (self.isRunning)
            {
                state = runState;
            }
            else
            {
                state = walkState;
            }

            return(state);
        }
コード例 #2
0
 public abstract MoveState GetState(HumanoidMoveStateMachine self, Vector3 moveInput);
コード例 #3
0
        #pragma warning restore 0649

        public override MoveState GetState(HumanoidMoveStateMachine self, Vector3 moveInput)
        {
            return(moveInput == Vector3.zero ? idleState : walkState);
        }