Esempio n. 1
0
    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);
        }
    }
Esempio n. 3
0
    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);
        }
    }
Esempio n. 6
0
    public void AvatarWantsNewQuest(AvatarQuest avatarQuest)
    {
        Quest quest = QuestForAvatar(avatarQuest);

        avatarQuest.CreateQuest(quest);
    }
Esempio n. 7
0
 public Quest QuestForAvatar(AvatarQuest avatar)
 {
     return(FirstQuestNotCompletedOrStarted(avatar.CompletedQuests(), avatar.StartedQuests()));
 }