public void Start() { _questStage = QuestStage.Started; foreach (var script in IntroScripts) { ScriptHelpers.Execute(script); } _questStage = QuestStage.Doing; }
public void Update() { if (_questStage != QuestStage.Doing) { return; } if (Tasks.Count <= 0) { _questStage = QuestStage.Completed; } for (int i = Tasks.Count - 1; i >= 0; i--) { if (Tasks[i].Evaluate()) { Tasks.RemoveAt(i); } else { _questStage = QuestStage.Failed; } } if (_questStage == QuestStage.Failed) { foreach (var script in FailedScripts) { ScriptHelpers.Execute(script); } } if (_questStage == QuestStage.Completed) { foreach (var script in SuccessScripts) { ScriptHelpers.Execute(script); } } }
public void Interact() { ScriptHelpers.Execute(Script, Parameter); }
public void Use() { ScriptHelpers.Execute(Script, Parameter); }