Ejemplo n.º 1
0
 public EnemyExplosionAnimation(AnimationManager pParent, Texture2D pTexture, int nMaxColumns, float fTimePerFrame)
 {
     m_pParent = pParent;
     m_pAnimation = new SimpleAnimation(pTexture, Vector2.Zero, 0, nMaxColumns, fTimePerFrame);
     m_pAnimation.Loop = false;
     m_pAnimation.Play = false;
 }
Ejemplo n.º 2
0
 public EnemySplashAnimation(AnimationManager pParent, Texture2D pTexture)
 {
     m_pParent = pParent;
     m_pTexture = pTexture;
     m_pOrigin = new Vector2(pTexture.Width / 2, pTexture.Height / 2);
     m_pSourceRectangle = new Rectangle(0, 0, pTexture.Width, pTexture.Height);
 }
Ejemplo n.º 3
0
        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);
        }