void Start() { var jsonTextFile = Resources.Load <TextAsset>("Goals"); allGoals = JsonUtility.FromJson <GoalRoot>(jsonTextFile.ToString()); if (GameManager.Instance.goalDone) { if (GameManager.Instance.choiceHelpMomFirst != -1 && !GameManager.Instance.chapter1Complete) { AdjustForC1Choice(); } if (GameManager.Instance.C1SpecGoal) { DisplayGoal(specGoal); } else if (GameManager.Instance.C1SpecGoal2) { DisplayGoal(specGoal + 1); } else { DisplayNextGoal(); } } else { DisplaySameGoal(); } }
/// <summary> /// Creates a new instance /// </summary> public GoalBrain() { _root = new GoalRoot(); base.Add(_root); }