Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            List <SpriteFont> fontList = new List <SpriteFont>
            {
                Content.Load <SpriteFont>("fonts/Generic")
            };
            Dictionary <StoryGraphicCode, Texture2D> storyGraphics = new Dictionary <StoryGraphicCode, Texture2D>
            {
                { StoryGraphicCode.Mochi, Content.Load <Texture2D>("graphics/Mochi") },
                { StoryGraphicCode.MochiCrazy, Content.Load <Texture2D>("graphics/MochiCrazy") },
                { StoryGraphicCode.KingCrab, Content.Load <Texture2D>("graphics/KingCrab") },
                { StoryGraphicCode.CrazyKing, Content.Load <Texture2D>("graphics/CrazyKing") }
            };
            Dictionary <BackgroundCode, Texture2D> bgs = new Dictionary <BackgroundCode, Texture2D>
            {
            };

            // TODO: use this.Content to load your game content here
            GraphicBuilder.LoadExternalGraphic(storyGraphics, bgs);
            GameFonts.LoadFonts(fontList);
            GraphicBuilder.BuildObjects(GraphicsDevice);
            _root = new RootComponent(GraphicsDevice, spriteBatch);
        }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Load spriteFonts here
            GameFonts.LoadFonts(Content);

            // Load all fo that sweet sweet content right here
            ScreenManager.Instance.LoadContent(Content);
        }