PantheonPrototype.DialogueManager.DialogueManager C# (CSharp) 메소드

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
        public DialogueManager(Pantheon gameReference, SpriteFont textFont)
        {
            ContentManager content = gameReference.Content;

            this.textFont = textFont;
            this.activeTextBubbles = new LinkedList<TextBubble>();
            this.conversations = new Dictionary<string, ArrayList>();
            this.npcStates = new Dictionary<string, string>();
            this.npcStateBubbles = new Dictionary<string, TextBubble>();

            this.currentConversationState = 0;

            // Set up event handling...
            this.interactionEventHandler = this.interact;
            this.interactionAlertEventHandler = this.interactAlert;
            this.spontaneousConversationEventHandler = this.spontaneousConversation;

            gameReference.EventManager.register("Interaction", this.interactionEventHandler);
            gameReference.EventManager.register("InteractionAlert", this.interactionAlertEventHandler);
            gameReference.EventManager.register("SpontaneousConversation", this.spontaneousConversationEventHandler);

            // Load the text bubble image.
            this.textbubbleImage = content.Load<Texture2D>("textbubble");
        }