private void Start() { progression = ProgressionManager.I; // choiceAction = new Dialogue.ChoiceAction(); choiceAction.key = objectiveChoice.key; // choiceAction.action = new UnityEvent(); choiceAction.action.AddListener(() => ProgressObjective()); if (string.IsNullOrEmpty(objectiveId)) { Debug.LogError("Objective missing id"); return; } progression.RegisterObjective(this); CheckLoadState(); // foreach(CountGoal i in completeConds.requiredCounts) { // i.current.onChange += OnCountValueChange; // } if (state == ObjectiveState.NotStarted && startConds.CheckCompleteReqs() && autoStartOnCondsMet) { StartObjective(); } var interactS = progression.GetInteractableState(targetInteractId); if (interactS != null) { OnInteractableRegistered(interactS.interactable); } if (state != ObjectiveState.Completed) { progression.onRegisterInteractable += OnInteractableRegistered; } }
public void Init(ProgressionManager pm) { progressionManager = pm; }