Пример #1
0
    private void createMoveToState()
    {
        moveToState = (fsm, gameObject) => {
            GOAPAction action = currentActions.Peek();
            if (action.requiresInRange() && action.target == null)
            {
                fsm.popState();
                fsm.popState();
                fsm.pushState(idleState);
                return;
            }

            if (dataProvider.IsAgentInRange(action))
            {
                fsm.popState();
            }
        };
    }