/// <summary>
        /// Создает новую ноду описывающую поставленную задачу (состояния к которым стримится ИИ).
        /// </summary>
        private GoapAIDebuggerNode CreateGoalNode(AIScenarioGoal goal, WorldState goalSate, ref Vector2 aNodePosition)
        {
            List <string> desc = new List <string> ();

            desc.Add(string.Format("<b><color={1}>GOAL</color> '<color={2}>{0}</color>'</b>",
                                   goal.name, _titleColor, _nameColor));
            desc.Add("   <b>Tends to conditions</b>");
            DescribeCondition(goal.conditions, ref desc);

            StringBuilder text = new StringBuilder();

            for (int i = 0, n = desc.Count; i < n; i++)
            {
                text.AppendLine(desc[i]);
            }

            return(AddNode(text.ToString(), 220.0f, CalcHeight(desc.Count), _goalStyle, _activeGoalStyle,
                           ref aNodePosition));
        }
Example #2
0
 public void SetupGoal(AIScenarioGoal goal)
 {
     this.goal = goal;
 }