void Close() { var avatar = actingInScene.GetActor("Tyra"); avatarQuest = avatar.GetComponentInChildren <AvatarQuest>(); avatarQuest.RemoveGoalObject(goalObject); ComponentDone(); }
protected override void Act() { var avatar = actingInScene.GetActor("Tyra"); avatarQuest = avatar.GetComponentInChildren <AvatarQuest>(); foreach (var questItem in itemsToPickup) { avatarQuest.AddInteractableTypeToLookFor(questItem.name); } }
protected override void Act() { Debug.Log("Starting Arrive At Destination: " + areaName); goalObject = GameObject.Find(areaName); DebugUtilities.Assert(goalObject != null, "Couldn't find object:" + areaName); var avatar = actingInScene.GetActor("Tyra"); avatarQuest = avatar.GetComponentInChildren <AvatarQuest>(); avatarQuest.AddGoalObject(goalObject); }
protected override void Act() { Debug.Log("Interactable: " + interactableName); goalObject = Interactable.GetInteractableFromName(interactableName); DebugUtilities.Assert(goalObject != null, "Couldn't find interactable component on:" + interactableName); var avatar = actingInScene.GetActor("Tyra"); avatarQuest = avatar.GetComponentInChildren <AvatarQuest>(); avatarQuest.AddGoalObject(goalObject.gameObject); }
void SetupQuestProgress(Player player, AvatarQuest avatarQuest, List <PlayerStorageDataStartedQuest> startedQuests, ICollection <string> completedQuests) { avatarQuest.SetCompletedQuests(completedQuests); if (startedQuests.Count == 0) { Debug.Log("You are not on a quest. Then I just fade up and hope for the best"); player.playerInteraction.FadeUp(); return; } foreach (var startedQuest in startedQuests) { Debug.Log("Putting you on the Quest:" + startedQuest.questId + " at part:" + startedQuest.questPart); var quest = quests.SpawnQuest(startedQuest.questId); quest.SkipToComponent(startedQuest.questPart); avatarQuest.SetQuestButDontReport(quest); } }
public void AvatarWantsNewQuest(AvatarQuest avatarQuest) { Quest quest = QuestForAvatar(avatarQuest); avatarQuest.CreateQuest(quest); }
public Quest QuestForAvatar(AvatarQuest avatar) { return(FirstQuestNotCompletedOrStarted(avatar.CompletedQuests(), avatar.StartedQuests())); }