public void OnInteraction(WorldInteractionType type) { var res = false; var component = Template.GetComponent(Step); if (component != null) { var acts = QuestManager.Instance.GetActs(component.Id); for (var i = 0; i < acts.Length; i++) { var act = acts[i]; if (act.DetailType == "QuestActObjInteraction") { var template = acts[i].GetTemplate <QuestActObjInteraction>(); if (template.WorldInteractionId == type) { res = true; Objectives[i]++; if (Objectives[i] > template.Count) // TODO check to overtime { Objectives[i] = template.Count; } } } } } if (res) { Update(); } }
public void OnInteraction(WorldInteractionType type) { foreach (var quest in Quests.Values) { quest.OnInteraction(type); } }