Exemple #1
0
    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);
    }
Exemple #2
0
    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);
    }
Exemple #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);
        }
    }