예제 #1
0
 private void Awake()
 {
     Id          = ++_idHolder;
     ActionQueue = new Queue <GoapAction>();
     Actions     = new HashSet <GoapAction>();
     Planner     = new GoapPlanner(this);
     AgentState  = new Dictionary <GoapCondition, bool>();
     LoadDefaultState();
     Entity = GetComponent <LivingEntity>();
 }
예제 #2
0
        private void Start()
        {
            _actionData = new HashSet <KeyValuePair <string, object> >();
            _planner    = new GoapPlanner();

            _stateMachine = new Fsm();
            CreateIdleState();
            //CreateMoveState();
            CreatePerformState();

            FindDataProvider();
            LoadActions();

            _stateMachine.PushState(_idleState);
        }