Esempio n. 1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //Particle Engine
            Texture2D texture = Content.Load <Texture2D>("exhaust");

            particleEngine = new ParticleEngine(texture, new Vector2(400, 240), 1);

            //Runners
            foreach (Runner mRunner in runnerList)
            {
                mRunner.LoadContent(Content, "run_cycle");
            }

            //Heli
            heli.LoadContent(Content, "HeliAnimation6");
            debugInfo.LoadContent(Content, "SpriteFont1");

            //Shader
            tempRenderTarget = new RenderTarget2D(GraphicsDevice, 1280, 720);    //ideally only do this once, not every frame
            effect1          = Content.Load <Effect>("Effect1");

            effectParameter1 = effect1.Parameters["brightness"];

            //Menu fonts
            menuFont  = Content.Load <SpriteFont>("spriteFont1");
            menuFont2 = Content.Load <SpriteFont>("spriteFont2");
        }
Esempio n. 2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //Particle Engine
            Texture2D texture = Content.Load<Texture2D>("exhaust");
            particleEngine = new ParticleEngine(texture, new Vector2(400, 240), 1);

            //Runners
            foreach (Runner mRunner in runnerList)
            {
                mRunner.LoadContent(Content, "run_cycle");
            }

            //Heli
            heli.LoadContent(Content, "HeliAnimation6");
            debugInfo.LoadContent(Content, "SpriteFont1");

            //Shader
            tempRenderTarget = new RenderTarget2D(GraphicsDevice, 1280, 720);    //ideally only do this once, not every frame
            effect1 = Content.Load<Effect>("Effect1");

            effectParameter1 = effect1.Parameters["brightness"];

            //Menu fonts
            menuFont = Content.Load<SpriteFont>("spriteFont1");
            menuFont2 = Content.Load<SpriteFont>("spriteFont2");
        }