Example #1
0
        //--------------------------------
        //Stack new state on top
        public void Push(StackState state)
        {
            if (state == null)
            {
                Debug.Log("Invalide state pass in!");
            }

            //If there is at least one state, it's about to be COVERED
            currentState?.OnCoverState();

            states.Push(state);

            //New state ENTERED
            state.OnEnterState();
        }
Example #2
0
 //Push on a new state stack
 public void Stack(StackState state)
 {
     this.Push(state);
 }