Exemple #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // textures
            textureMap = ContentFactory.TextureFactory(graphics);

            // sound effects
            soundEffects.Add("chest-opened", ContentFactory.LoadSound(@"..\..\..\..\Content\soundeffects\65 Treasure Chest Opening.wav", graphics));

            // songs
            // make a song map

            // fonts
            Font = Content.Load <SpriteFont>("font");

            // dialogue box
            dialogueBox = new DialogueBox(graphics)
            {
                Text = "Hello World! Press Enter or Button A to proceed.\n" +
                       "I will be on the next pane! " +
                       "And wordwrap will occur, especially if there are some longer words!\n" +
                       "Monospace fonts work best but you might not want Courier New.\n" +
                       "In this code sample, after this dialog box finishes, you can press the O key to open a new one."
            };
            dialogueBox.Initialize();
            updateContext.textureMap = textureMap;
        }