PantheonPrototype.DialogueManager.spontaneousConversation C# (CSharp) Method

spontaneousConversation() protected method

Adds the ability for spontaneous conversation, such as timed text boxes or temporary text boxes.
protected spontaneousConversation ( Event firedEvent ) : void
firedEvent Event The incoming event.
return void
        protected void spontaneousConversation(Event firedEvent)
        {
            string entityName = firedEvent.payload["EntityKey"];
            Entity entity = firedEvent.GameReference.currentLevel.Entities[entityName];

            if (this.npcStates[entityName] == DialogueManager.STATE_TALKING) return;

            if (this.conversations.Keys.Contains(entityName))
            {
                this.npcStates[entityName] = DialogueManager.STATE_SPONTANEOUS;
                this.npcStateBubbles[entityName].isReadyForDeletion = true;
                this.npcStateBubbles[entityName] = new TextBubble(entity, firedEvent.payload["Text"]);
            }
        }