Example #1
0
        public override bool Execute()
        {
            Debug.Log("this is the test state");

            if (Input.GetKeyDown(KeyCode.Space))
            {
                states.SetState(locomotionState);
            }

            return(false);
        }
Example #2
0
        public override bool Execute()
        {
            states.horizontal = Input.GetAxis("Horizontal");
            states.vertical   = Input.GetAxis("Vertical");

            Debug.Log("This is in the locomotion state");

            if (Input.GetKeyDown(KeyCode.Space))
            {
                states.SetState(targetState);
                return(true);
            }

            return(false);
        }