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.
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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