C# Класс PantheonPrototype.DialogueManager

This class will handle the basics of dialogue and what all that entails. This includes drawing the appropriate bubbles and text, as well as possibly handling some basic dialogue pathing and such.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
activeTextBubbles LinkedList
conversations ArrayList>.Dictionary
currentConversation System.Collections.ArrayList
currentConversationBubble TextBubble
currentConversationState int
interactionAlertEventHandler HandleEvent
interactionEventHandler HandleEvent
npcStateBubbles TextBubble>.Dictionary
npcStates string>.Dictionary
spontaneousConversationEventHandler HandleEvent
textFont Microsoft.Xna.Framework.Graphics.SpriteFont
textbubbleImage Microsoft.Xna.Framework.Graphics.Texture2D

Открытые методы

Метод Описание
DialogueManager ( Pantheon gameReference, SpriteFont textFont ) : System

Constructs the basics of the DialogueManager class and prepares it to handle dialogue and conversation.

Draw ( SpriteBatch context ) : void

Draws all the active text bubbles in their appropriate place.

EndConversation ( string entityName ) : void

Ends all current conversations and resets the conversation handles and anchors.

Load ( Dictionary importedConversations ) : void

Loads the stuff.

StartConversation ( String entityName, Entity entity ) : bool

Starts a conversation with a given entity. This entity ID is used to identify which conversation to execute.

Unregister ( Pantheon gameREFERENCEOFDOOMFORTHESAVINGOFTHEUNIVERSE ) : void

Seems legit.

Update ( GameTime gameTime, Pantheon gameReference ) : void

Keeps DialogueManager up-to-date. Makes sure no conversations are still on going. Manages the checking of exit conditions for text bubbles.

Защищенные методы

Метод Описание
interact ( Event firedEvent ) : void

Is used to interact with NPCs. If there is no conversation going, it will initialize one. If the end of a conversation has been reached, it will end the conversation.

interactAlert ( Event firedEvent ) : void

Handles an event for an interaction alert, such as a "close poximity" alert or a flagged NPC.

spontaneousConversation ( Event firedEvent ) : void

Adds the ability for spontaneous conversation, such as timed text boxes or temporary text boxes.

Описание методов

DialogueManager() публичный Метод

Constructs the basics of the DialogueManager class and prepares it to handle dialogue and conversation.
public DialogueManager ( Pantheon gameReference, SpriteFont textFont ) : System
gameReference Pantheon
textFont Microsoft.Xna.Framework.Graphics.SpriteFont
Результат System

Draw() публичный Метод

Draws all the active text bubbles in their appropriate place.
public Draw ( SpriteBatch context ) : void
context Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

EndConversation() публичный Метод

Ends all current conversations and resets the conversation handles and anchors.
public EndConversation ( string entityName ) : void
entityName string
Результат void

Load() публичный Метод

Loads the stuff.
public Load ( Dictionary importedConversations ) : void
importedConversations Dictionary
Результат void

StartConversation() публичный Метод

Starts a conversation with a given entity. This entity ID is used to identify which conversation to execute.
public StartConversation ( String entityName, Entity entity ) : bool
entityName String The entity to begin conversing with. Used as a handle to pick the conversation "column."
entity Entity
Результат bool

Unregister() публичный Метод

Seems legit.
public Unregister ( Pantheon gameREFERENCEOFDOOMFORTHESAVINGOFTHEUNIVERSE ) : void
gameREFERENCEOFDOOMFORTHESAVINGOFTHEUNIVERSE Pantheon yep
Результат void

Update() публичный Метод

Keeps DialogueManager up-to-date. Makes sure no conversations are still on going. Manages the checking of exit conditions for text bubbles.
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime
gameReference Pantheon
Результат void

interact() защищенный Метод

Is used to interact with NPCs. If there is no conversation going, it will initialize one. If the end of a conversation has been reached, it will end the conversation.
protected interact ( Event firedEvent ) : void
firedEvent Event The event of the fired thingy.
Результат void

interactAlert() защищенный Метод

Handles an event for an interaction alert, such as a "close poximity" alert or a flagged NPC.
protected interactAlert ( Event firedEvent ) : void
firedEvent Event The incoming event.
Результат void

spontaneousConversation() защищенный Метод

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.
Результат void

Описание свойств

activeTextBubbles защищенное свойство

protected LinkedList activeTextBubbles
Результат LinkedList

conversations защищенное свойство

protected Dictionary conversations
Результат ArrayList>.Dictionary

currentConversation защищенное свойство

protected ArrayList,System.Collections currentConversation
Результат System.Collections.ArrayList

currentConversationBubble защищенное свойство

protected TextBubble,PantheonPrototype currentConversationBubble
Результат TextBubble

currentConversationState защищенное свойство

protected int currentConversationState
Результат int

interactionAlertEventHandler защищенное свойство

protected HandleEvent interactionAlertEventHandler
Результат HandleEvent

interactionEventHandler защищенное свойство

protected HandleEvent interactionEventHandler
Результат HandleEvent

npcStateBubbles защищенное свойство

protected Dictionary npcStateBubbles
Результат TextBubble>.Dictionary

npcStates защищенное свойство

protected Dictionary npcStates
Результат string>.Dictionary

spontaneousConversationEventHandler защищенное свойство

protected HandleEvent spontaneousConversationEventHandler
Результат HandleEvent

textFont защищенное свойство

protected SpriteFont,Microsoft.Xna.Framework.Graphics textFont
Результат Microsoft.Xna.Framework.Graphics.SpriteFont

textbubbleImage защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics textbubbleImage
Результат Microsoft.Xna.Framework.Graphics.Texture2D