public void SetGoalGetBattleGrid(int depth, params Vector3[] positions)
        {
            if (_canRecieveGoals == false)
            {
                return;
            }


            if (properties == null)
            {
                Debug.LogError("Agent dont have assigned Properties");
                return;
            }

            if (!properties.battleGrid)
            {
                Debug.LogWarning("you trying to get battle grid when you dont even set properties to generate battle grid");
                return;
            }

            lock (this)
                if (canSendGridRequest == false)
                {
                    return;
                }

            if (positions.Length == 0)
            {
                PathFinder.GetBattleGrid(this, depth, null, transform.position);
            }
            else
            {
                PathFinder.GetBattleGrid(this, depth, null, positions);
            }
        }
Beispiel #2
0
        public void SetGoalGetBattleGrid(int depth, params Vector3[] positions)
        {
            if (_canRecieveGoals == false)
            {
                return;
            }

            if (!properties.doNavMesh)
            {
                Debug.LogWarning("you trying to get battle grid when you dont even set properties to generate battle grid");
                return;
            }

            if (positions.Length == 0)
            {
                PathFinder.GetBattleGrid(this, depth, null, transform.position);
            }
            else
            {
                PathFinder.GetBattleGrid(this, depth, null, positions);
            }
        }