/// <summary> /// Checks if a goal is satisfied. Nulls the goal on completion. /// </summary> /// <returns> /// TRUE if the goal is satisfied or null, else FALSE. /// </returns> public bool CheckGoal() { if (goal == null) { return true; } if (goal.CheckGoal ()) { goal = null; return true; } return false; }
private void SetGoal(Goals.Goal g) { Debug.Log ("Changing goal to " + g); goal = g; }