public MainGameScene(int restingHeartRate, bool heartCore)
        {
            this.Entities = new List<Entity>();
            ClockManager = new Timing.ClockManager();

            m_Player = new PlayerThing(this, restingHeartRate);
            m_BulletManager = new BulletManager(this);
            m_BugManager = new BugManager(this);
            // m_PingManager = new PingManager(this);
            m_PingManager = new NewPingManager(this);
            m_BackgroundTexture = HeartAttack.theGameInstance.Content.Load<Texture2D>("background");
            m_Ripple = HeartAttack.theGameInstance.Content.Load<Effect>("RippleShader");

            m_PingLengthsParameter = m_Ripple.Parameters["pingLengths"];
            m_Ripple.Parameters["Viewport"].SetValue(
                new Vector2(HeartAttack.theGameInstance.graphics.GraphicsDevice.Viewport.Width,
                    HeartAttack.theGameInstance.graphics.GraphicsDevice.Viewport.Height));

            m_ShaderRenderTarget = new RenderTarget2D
                (HeartAttack.theGameInstance.graphics.GraphicsDevice,
                HeartAttack.theGameInstance.graphics.GraphicsDevice.PresentationParameters.BackBufferWidth,
                HeartAttack.theGameInstance.graphics.GraphicsDevice.PresentationParameters.BackBufferHeight);
            m_ShaderTexture = new Texture2D(
                HeartAttack.theGameInstance.graphics.GraphicsDevice,
                HeartAttack.theGameInstance.graphics.GraphicsDevice.PresentationParameters.BackBufferWidth,
                HeartAttack.theGameInstance.graphics.GraphicsDevice.PresentationParameters.BackBufferHeight, true,
                m_ShaderRenderTarget.Format
                );

            director = new AIDirector(m_Player, heartCore);
        }
Beispiel #2
0
 public void HitPlayer(PlayerThing player)
 {
     m_HeartHitSound.Play();
     handleDeath();
 }
Beispiel #3
0
 public AIDirector(PlayerThing pPlayer, bool pHeartcore)
 {
     m_Player = pPlayer;
     m_Heartcore = pHeartcore;
 }
Beispiel #4
0
 public bool CollidesWith(PlayerThing pPlayer)
 {
     return (m_Sprite.Position - pPlayer.Position).Length() <
         this.radius + pPlayer.Radius;
 }