Example #1
0
        private void Awake()
        {
            _planner = GetComponent <LayeredGoalOrientedActionPlanner>();
            if (_planner.InitializationStatus != InitializationState.Active)
            {
                Debug.LogError("Planner not initialized.");
                Destroy(this);
                return;
            }

            _domain             = _planner.Domain;
            _intermediateGoals  = new string[_domain.IntermediateLayerCount][];
            _activeGoalsIndices = new byte[_domain.IntermediateLayerCount];
            for (var i = 0; i < _activeGoalsIndices.Length; i++)
            {
                _activeGoalsIndices[i] = byte.MaxValue;
            }

            _planner.Debugger = this;
        }
Example #2
0
 private void OnDestroy()
 {
     _domain  = null;
     _planner = null;
 }