Пример #1
0
        override public void Update(float systemTime)
        {
            // Snd update - keeps everything moving and updating smoothly
            sndEngine.Update();

            // Single Step, Free running...
            Simulation.Update(systemTime);

            // Input
            InputMan.Update();

            // Run based on simulation stepping
            if (Simulation.GetTimeStep() > 0.0f)
            {
                // Fire off the timer events
                TimerMan.Update(Simulation.GetTotalTime());

                // walk through all objects and push to flyweight
                GameObjectMan.Update();

                // Do the collision checks
                ColPairMan.Process();

                // Delete any objects here...
                DelayedObjectMan.Process();
            }
        }
        public override void Update(float time)
        {
            InputMan.Update();

            SpaceInvaders pSI       = SpaceInvaders.GetInstance();
            Font          pScoreOne = FontMan.Find(Font.Name.ScoreOne);

            Debug.Assert(pScoreOne != null);
            pScoreOne.UpdateMessage("" + pSI.scoreOne);

            Font pScoreTwo = FontMan.Find(Font.Name.ScoreTwo);

            Debug.Assert(pScoreTwo != null);
            pScoreTwo.UpdateMessage("" + pSI.scoreTwo);


            Font pScoreMax = FontMan.Find(Font.Name.HighestScore);

            Debug.Assert(pScoreMax != null);
            pScoreMax.UpdateMessage("" + pSI.scoreHigh);

            //Simulation.Update(time);
            //if (Simulation.GetTimeStep() > 0.0f)
            //{
            //    // Fire off the timer events
            //    TimerMan.Update(Simulation.GetTotalTime());

            //}
        }
Пример #3
0
 override public void Update(float systemTime)
 {
     //Font pTestMessage = FontMan.Find(Font.Name.TitleString);
     //Debug.Assert(pTestMessage != null);
     //pTestMessage.UpdateMessage("dog " + count++);
     GameObjectMan.Update();
     InputMan.Update();
 }
Пример #4
0
        public override void Update(float systemTime)
        {
            // Input
            InputMan.Update();

            // walk through all objects and push to flyweight
            GameObjectMan.Update();

            string updatedScore = (SceneContext.highScore).ToString("D4");

            this.pFontHighScore.UpdateMessage(updatedScore);
        }
Пример #5
0
        public override void Update(float systemTime)
        {
            InputMan.Update();

            TimerMan.Update(systemTime);

            ColPairMan.Process();

            GameObjectMan.Update();

            DelayedObjectMan.Process();
        }
        public override void Update(float systemTime)
        {
            // Input
            InputMan.Update();

            // Do the collision checks
            ColPairMan.Process();

            // walk through all objects and push to flyweight
            GameObjectMan.Update();

            // Delete any objects here...
            DelayedObjectMan.Process();
        }
        public override void Update(float time)
        {
            // Add your update below this line: ----------------------------
            //in order to render the ship on screen
            pShip.Update();

            //Update the player 1 score
            Font pScoreOne = FontMan.Find(Font.Name.ScoreOne);

            Debug.Assert(pScoreOne != null);
            SpaceInvaders pSI = SpaceInvaders.GetInstance();

            pScoreOne.UpdateMessage("" + pSI.scoreOne);

            //update the player lives
            Font pLives = FontMan.Find(Font.Name.PlayerLives);

            Debug.Assert(pLives != null);
            pLives.UpdateMessage("X" + playLives);

            // Snd update - keeps everything moving and updating smoothly
            SpaceInvaders.GetInstance().sndEngine.Update();

            // Single Step, Free running...
            Simulation.Update(time);

            // Input
            InputMan.Update();

            if (Iterator.GetChild(pUFOGroup) != null)
            {
                SpaceInvaders.GetInstance().sndEngine.Play2D("ufo_highpitch.wav");
            }

            // Run based on simulation stepping
            if (Simulation.GetTimeStep() > 0.0f)
            {
                // Fire off the timer events
                TimerMan.Update(Simulation.GetTotalTime());

                // Do the collision checks
                ColPairMan.Process();

                // walk through all objects and push to flyweight
                GameObjectMan.Update();

                // Delete any objects here...
                DelayedObjectMan.Process();
            }
        }
Пример #8
0
        public override void update(Scene pScene, float currTime)
        {
            // Add your update below this line: ----------------------------
            SoundMan.Update();

            InputMan.Update();

            TimerMan.Update(currTime);
            GameObjectMan.Update();

            // check collision
            CollisionPairMan.Process();

            // Delete any objects here...
            DelayedObjectMan.Process();
        }
Пример #9
0
        public override void Update(float systemTime)
        {
            this.UpdateStats();

            // Fire off the timer events
            TimerMan.Update(systemTime);

            // Input
            InputMan.Update();

            // walk through all objects and push to proxy
            GameObjectMan.Update();

            // Do the collision checks
            ColPairMan.Process();

            // Delete any objects here...
            DelayedObjectMan.Process();
        }
Пример #10
0
        public override void Update(float time)
        {
            InputMan.Update();

            SpaceInvaders pSI       = SpaceInvaders.GetInstance();
            Font          pScoreOne = FontMan.Find(Font.Name.ScoreOne);

            Debug.Assert(pScoreOne != null);
            pScoreOne.UpdateMessage("" + pSI.scoreOne);

            Font pScoreTwo = FontMan.Find(Font.Name.ScoreTwo);

            Debug.Assert(pScoreTwo != null);
            pScoreTwo.UpdateMessage("" + pSI.scoreTwo);

            Font pScoreMax = FontMan.Find(Font.Name.HighestScore);

            Debug.Assert(pScoreMax != null);
            pScoreMax.UpdateMessage("" + pSI.scoreHigh);
        }
Пример #11
0
 public override void Update(float systemTime)
 {
     InputMan.Update();
 }
Пример #12
0
 public override void update(Scene pScene, float currTime)
 {
     InputMan.Update();
 }
Пример #13
0
        public override void Update()
        {
            // Add your update below this line: ----------------------------

            //-----------------------------------------------------------
            // Sound Update - place here:
            //-----------------------------------------------------------

            //---------------------------------------------------------------------------------------------------------
            // Font Experiment
            //---------------------------------------------------------------------------------------------------------
            Font pTestMessage = FontMan.Find(Font.Name.TestMessage);

            Debug.Assert(pTestMessage != null);
            pTestMessage.UpdateMessage("dog " + count++);

            // walk through all objects and push to proxy
            GameObjectMan.Update();

            // Do the collision checks
            ColPairMan.Process();

            //-----------------------------------------------------------
            // Sound Experiments
            //-----------------------------------------------------------

            // Adjust music theme volume
            Sound tmpSnd = SoundMan.Find(Sound.Name.Snd_Theme);
            float vol    = tmpSnd.GetVolume();

            if (vol > 0.30f)
            {
                vol_delta = -0.002f;
            }
            else if (vol < 0.00f)
            {
                vol_delta = 0.002f;
            }
            tmpSnd.SetVolume(vol + vol_delta);

            InputMan.Update();
            // Load by file
            missileCount++;
            if (missileCount == 200)
            {
                missileCount = 0;
                // play one by file, not by load
                SoundMan.Play(Sound.Name.Snd_Shoot);
            }

            //// Trigger already loaded sounds
            //if (pMissile.y > 500.0f || pMissile.y < 100.0f)
            //{
            //    pMissile.speed *= -1.0f;

            //    switch (count%4)
            //    {
            //        case 0:
            //            SoundMan.Play(Sound.Name.Snd_HitWall);
            //            break;
            //        case 1:
            //            SoundMan.Play(Sound.Name.Snd_Explosion);
            //            break;
            //        case 2:
            //            SoundMan.Play(Sound.Name.Snd_UFO1);
            //            break;
            //        case 3:
            //            SoundMan.Play(Sound.Name.Snd_UFO2);
            //            break;
            //        default:
            //            Debug.Assert(false);
            //            break;
            //    }

            //}
            // Fire off the timer events
            TimerMan.Update(this.GetTime());

            GameObjectMan.Update();

            //Debug.WriteLine("\n------------------------------------");
            ColPairMan.Process();
        }