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); }
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); }
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); } }