Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();
            Commands.Enabled = false;

            int          initGAccess  = GAccess.SolidTag.ID;
            GFX          graphicsInit = GFX.Instance;
            DialogueData dialogueInit = DialogueData.Instance;

            NarBox = new NarBox();

            // create NPCs
            NPCDict = new Dictionary <string, NPC>();
            NPC aisya = new NPC("Aisya");

            aisya.Add(new CoDialogue("SCENE1001AISYA"));
            NPCDict.Add("Aisya", aisya);

            // initialize player and scene
            Player = new Player(new Vector2(9 * 16, 12 * 16));
            Scene  = new MainMenu();

            // intro dialogue
            GameDialogue = new CoDialogue();
        }
Пример #2
0
 /// <summary>
 /// This is called when the game should draw itself.
 /// </summary>
 /// <param name="gameTime">Provides a snapshot of timing values.</param>
 protected override void Draw(GameTime gameTime)
 {
     base.Draw(gameTime);
     if (NarBox.Open)
     {
         NarBox.Render();
     }
 }
Пример #3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            //Debug Console
            if (NarBox.Open)
            {
                NarBox.UpdateOpen();
            }
            //else
            //    NarBox.UpdateClosed();

            if (GameDialogue.Activated)
            {
                GameDialogue.Update();
            }
        }