public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager pContent) { m_pGameConfiguration = new GameConfiguration(); m_pGameConfiguration.Load(); m_pCamera = new Camera(this.Parent.GraphicsDevice); m_pCamera.Zoom = 3; m_pParticleEngine = new ParticleEngine(this); m_pParticleEngine.LoadContent(pContent); /* m_pParticleEngine.Emitter(new Vector2(0, 0), new Vector2(0, 0), Color.Blue, 10000, 500); m_pParticleEngine.ExplosionEmitter(new Vector2(0, -4), Color.Red, Color.Yellow, 500, 50); */ m_pLevel = new Level(this); m_pLevel.LoadContent(pContent); m_pBulletManager = new BulletManager(this); m_pBulletManager.LoadContent(pContent); m_rgPlayers[0] = new Player(this, 1); if(this.Parent.Settings.TwoPlayers) m_rgPlayers[1] = new Player(this, 2); else m_rgPlayers[1] = new Player(this, 0); m_rgPlayers[0].LoadContent(pContent); m_rgPlayers[1].LoadContent(pContent); m_rgPlayers[0].PlayerIndex = Parent.Settings.PlayerOne; m_rgPlayers[1].PlayerIndex = Parent.Settings.PlayerTwo; m_rgPlayers[0].Speed = m_pGameConfiguration.PlayerSpeed; m_rgPlayers[1].Speed = m_pGameConfiguration.PlayerSpeed; m_pEnemyManager = new EnemyManager(this); m_pEnemyManager.LoadContent(pContent); //m_pEnemyManager.InitRandom(); m_pFont = pContent.Load<SpriteFont>("GFX\\Fonts\\debugFont"); m_pLightEffect = pContent.Load<Effect>("Effects\\lightEffect"); m_pBlurEffect = pContent.Load<Effect>("Effects\\blurEffect"); m_pLightEngine = new LightEngine(this); m_pLightEngine.LoadContent(pContent); m_pAnimationManager = new AnimationManager(this); m_pAnimationManager.LoadContent(pContent); m_pScrollerDisplay = new ScrollerDisplay.ScrollerDisplay(); m_pScrollerDisplay.LoadContent(pContent); m_pGameRenderTarget = new RenderTarget2D(this.Parent.GraphicsDevice, this.Parent.GraphicsDevice.PresentationParameters.BackBufferWidth, this.Parent.GraphicsDevice.PresentationParameters.BackBufferHeight); m_pLightRenderTarget = new RenderTarget2D(this.Parent.GraphicsDevice, this.Parent.GraphicsDevice.PresentationParameters.BackBufferWidth, this.Parent.GraphicsDevice.PresentationParameters.BackBufferHeight); m_rgLevelItems[0] = new FlickeringLight(this); m_rgLevelItems[0].LoadContent(pContent); //m_rgLevelItems[1] = new FlickeringLight(this); m_pGameEditor = new GameEditor(this); m_pGameEditor.LoadContent(pContent); base.LoadContent(pContent); }
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager pContent) { m_pParticleEngine = new ParticleEngine(this); m_pParticleEngine.LoadContent(pContent); m_pScrollerDisplay = new ScrollerDisplay.ScrollerDisplay(); m_pScrollerDisplay.LoadContent(pContent); m_pScrollerDisplay.Display("PRESS START", 0, 0); for (int i = 0; i < 10; i++) { float fRandomY = (float)m_pParticleEngine.Random.Next(-10, 10) / 10; float fRandomX = (float)m_pParticleEngine.Random.Next(-10, 10) / 10; m_pParticleEngine.Emitter(new Vector2(i*100 + 100, 600), new Vector2(fRandomX, fRandomY), Color.Red, 10000, 1000); } m_pFont = pContent.Load<SpriteFont>("GFX\\Fonts\\defaultFont"); FileStream pStream = File.OpenRead("result.png"); m_pTexture = Texture2D.FromStream(Parent.GraphicsDevice, pStream); base.LoadContent(pContent); }