示例#1
0
    public void OnSetupNextLine(ActorScene scene, ActorSceneComponent part)
    {
        if (part is ActorCompleteMinigame || part is ActorShowQuestParchment || part is ActorPosition)
        {
            Debug.Log("Note: We are not saving progress for type:" + part.GetType().ToString());
            return;
        }
        var questPartNotification = new QuestPartNotification(scene as Quest, part);

        SendMessage("OnStartedQuestPart", questPartNotification);
    }
示例#2
0
    void PlayNextLine()
    {
        gotoNextLine = false;

        if (SceneIsDone())
        {
            CompletedScene();
            return;
        }

        if (activeLine != null)
        {
            activeLine.Dispose();
            activeLine = null;
        }

        Debug.Log($"play next line {lineIndex} ");
        activeLine = lines[lineIndex];
        if (activeLine)
        {
            Debug.Log("Actorscene " + name + " sets line: " + activeLine.name + " _________________________________________");
        }
        else
        {
            Debug.Log("Actorscene " + name + " has a missing line with index: " + lineIndex + " _________________________________________!!");
        }


#if UNITY_EDITOR
        debugString = name + ": " + activeLine.name;
#endif

        DebugUtilities.Assert(activeLine != null, "Active Line is null");
        lineIndex++;

        if (activeLineNotification != null)
        {
            activeLineNotification(this, activeLine);
        }

        DebugUtilities.Assert(activeLine != null, "Active Line is null before act");
        Debug.Log("ACT: scene: " + activeLine.name + " " + activeLine.GetType());

        activeLine.OnComponentDone   += OnComponentDone;
        activeLine.OnComponentFailed += OnComponentFailed;
        activeLine.OnComponentQuit   += OnComponentQuit;

        activeLine.ActInScene(this);

        SetupMoveAndInteraction();

        isResuming = false;
    }
示例#3
0
    void ComponentEnded(ActorSceneComponent componentThatIsDone)
    {
        Debug.Log("STOP ACTING (splitter) " + componentThatIsDone.name);
        componentThatIsDone.Dispose();
        foreach (var component in components)
        {
            if (component.ShouldUpdate)
            {
                return;
            }
        }

        ComponentDone();
    }
示例#4
0
    void CloseScene()
    {
        if (activeLine != null)
        {
            activeLine.Dispose();
            activeLine.RemoveFromScene();
            activeLine = null;
        }

        Debug.Log("### CLOSING SCENE:" + name);

        isActingScene = false;
        PlaceActorsAfterScene();
        NotifyActorsThatSceneIsOver();
        SetInteractionForMainCharacter(true);
        SetMovementForMainCharacter(true);
        actorsInScene.Clear();
        Destroy(transform.root.gameObject);
    }
示例#5
0
 void OnSubComponentQuit(ActorSceneComponent component)
 {
     Debug.Log("ActorCompleteComponents: " + component.name + " QUIT!");
     ComponentEnded(component);
 }
示例#6
0
 void OnSubComponentFailed(ActorSceneComponent component)
 {
     Debug.Log("ActorCompleteComponents: " + component.name + " Failed!");
     ComponentEnded(component);
 }
示例#7
0
 void OnSubComponentDone(ActorSceneComponent component)
 {
     Debug.Log("ActorCompleteComponents: " + component.name + " is done.");
     ComponentEnded(component);
 }
 public void OnStartedQuestPart(Quest quest, ActorSceneComponent component)
 {
     player.playerStorage.SetStartedQuestPart(quest.questName, component.name);
 }
 public QuestPartNotification(Quest _quest, ActorSceneComponent _part)
 {
     quest = _quest;
     part  = _part;
 }
示例#10
0
 void OnComponentQuit(ActorSceneComponent component)
 {
     QuitScene();
 }
示例#11
0
 void OnComponentFailed(ActorSceneComponent component)
 {
     QuitScene();
 }
示例#12
0
 void OnComponentDone(ActorSceneComponent component)
 {
     Debug.Log("Component reported done:" + component.name);
     DebugUtilities.Assert(component == activeLine, "Got Component Done from a component that is not acting. Got:" + component.name + " expecting:" + activeLine.name);
     gotoNextLine = true;
 }
 public QuestProgress(Quest _quest, ActorSceneComponent component)
 {
     quest     = _quest;
     questPart = component;
 }