コード例 #1
0
ファイル: OutputStack.cs プロジェクト: Raud0/Last-Call
    public void Initialize(ActorStack stack)
    {
        this.myStack = stack;

        stateManager = Instantiate(stateManagerObject, transform).GetComponent <StateManager>();
        stateManager.Initialize(this);
        decider = Instantiate(deciderObject, transform).GetComponent <Decider>();
        decider.Initialize(this);
    }
コード例 #2
0
ファイル: InputStack.cs プロジェクト: Raud0/Last-Call
    public void Initialize(ActorStack stack, HashSet <Topic> newTopics, HashSet <Thought> newThoughts)
    {
        myStack = stack;
        myStack.conversation.OnSpeech      += Route;
        myStack.conversation.OnInteraction += Route;

        attention = Instantiate(attentionObject, transform).GetComponent <Attention>();
        attention.Initialize(this);
        thoughts = Instantiate(thoughtsObject, transform).GetComponent <Thoughts>();
        thoughts.Initialize(this);
        observer = Instantiate(observerObject, transform).GetComponent <Observer>();
        observer.Initialize(this);

        attention.Load(newTopics);
        thoughts.Load(newThoughts);
    }
コード例 #3
0
    private void ReceiveSpeech(Speech speech)
    {
        if (completed.Contains(speech.Thought))
        {
            return;
        }

        ActorStack actor = GetActor(speech.Actor);

        SpeechDisplay speechDisplay = GetSpeechDisplay(speech);

        if (speechDisplay.UpdateProgress(speech.Progress))
        {
            speeches.Remove(speech.Thought);
            completed.Add(speech.Thought);
        }
    }