示例#1
0
 private void LoadGoals(Subtask parentSubtask, JsonGoal[] jsonGoals)
 {
     for (int i = 0; i < jsonGoals.Length; i++)
     {
         GlobalCondition currentGlobalCondition = AppController.instance.stateManager.FindGlobalConditionByName(jsonGoals[i].name);
         if (currentGlobalCondition != null)
         {
             Condition newGoal = new Condition(currentGlobalCondition, jsonGoals[i].satisfied);
             parentSubtask.AddGoal(newGoal);
         }
     }
 }