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 systemTime) { InputMan.Update(); TimerMan.Update(systemTime); ColPairMan.Process(); GameObjectMan.Update(); 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(); } }
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(); }
public override void Update() { SpaceInvaders pGame = GameMan.GetGame(); pGame.sndEngine.Update(); InputManager.Update(); Simulation.Update(pGame.GetTime()); if (Simulation.GetTimeStep() > 0.0f) { //start timer TimerMan.Update(Simulation.GetTotalTime()); //Update all the game objects(nodes) GONodeMan.Update(); //check for collisions ColPairMan.Process(); //process observers DelayedObjectMan.Process(); } //--------------------------------------------------------------------------------------------------------- // Font Practice //--------------------------------------------------------------------------------------------------------- Font pScoreMessage = FontMan.Find(Font.Name.P1Points); Debug.Assert(pScoreMessage != null); pScoreMessage.UpdateMessage("" + (PlayerMan.GetP1Score())); Font pHiScore = FontMan.Find(Font.Name.HiPoints); Debug.Assert(pHiScore != null); pHiScore.UpdateMessage("" + PlayerMan.GetHiScore()); Font pP1LivesLeft = FontMan.Find(Font.Name.LivesP1); Debug.Assert(pP1LivesLeft != null); pP1LivesLeft.UpdateMessage("P1 Lives: " + (PlayerMan.GetP1Lives())); }
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(); }
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(); }