示例#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);
            Sprite.SpriteBatch = spriteBatch;
            Sprite.Graphics    = graphics;
            Sprite.BasicEffect = new BasicEffect(graphics.GraphicsDevice, null);
            Sprite.BasicEffect.EnableDefaultLighting();

            //effect load
            EngineContent.SetEffectList("effects\\");
            EngineContent.LoadEffects();

            //texture load
            EngineContent.SetTextureList("textures\\");
            EngineContent.LoadTextures();

            //texture cube load
            EngineContent.SetTextureCubeList("cubeMaps\\");
            EngineContent.LoadTextureCube();

            //model load
            EngineContent.SetModelList("models\\");
            EngineContent.LoadModels();

            //cursor load
            Cursor cursor = new Cursor();

            cursor.AddCursor(ECursor.Aim, "aim");
            cursor.AddCursor(ECursor.Arrow, "custom");
            cursor.CurrentCursor = ECursor.Arrow;
            manager.Cursor       = cursor;

            //font load
            SpriteFont spriteFont = Content.Load <SpriteFont>("fonts\\TextFont12");

            Sprite.SpriteFont = spriteFont;
            Sprite.Create();

            manager.CreateScreens();
            manager.Camara.InitCamara();
            manager.LoadModels();

            // TODO: use this.Content to load your game content here
        }