public void ChangeStatus(IQuest reference, IQuest.Status status) { IQuest quest = this.GetQuest(reference.uniqueID); if (quest != null) { quest.ChangeStatus(status); } }
// PUBLIC METHODS: ------------------------------------------------------------------------ public void Setup(IQuest quest) { gameObject.SetActive(true); this.quest = quest; this.UpdateQuest(); this.cacheStatus = this.quest.status; this.cacheProgress = this.quest.progress; QuestsManager.Instance.questEvents.SetOnChange(this.OnQuestChange); }
private void OnChangeQuestStatus(IQuest.Status status) { if (status == this.toStatus) { GameObject target = (HookPlayer.Instance == null ? gameObject : HookPlayer.Instance.gameObject ); this.ExecuteTrigger(target); } }
// PRIVATE METHODS: ----------------------------------------------------------------------- private void OnQuestChange(string questID) { this.UpdateQuest(); if (this.quest.status != this.cacheStatus || !Mathf.Approximately(this.quest.progress, this.cacheProgress)) { this.cacheStatus = this.quest.status; this.cacheProgress = this.quest.progress; if (this.animator) { this.animator.SetTrigger(this.triggerUpdate); } } }