コード例 #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);
            Sprite.BasicEffect.EnableDefaultLighting();

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

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

            //texture cube load
            //TODO PORT EngineContent.SetTextureCubeList("cubeMaps\\");
            //TODO PORT 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\\spriteFont12");

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

            SamplerState sState = new SamplerState();

            sState.Filter = TextureFilter.Anisotropic;
            Sprite.Graphics.GraphicsDevice.SamplerStates[0] = sState;

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

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