示例#1
0
        public override void Update(float systemTime)
        {
            InputManager.Update();

            FontManager.Update(Font.Name.Player1Score, SpaceInvaders.pPlayer1Score);
            FontManager.Update(Font.Name.Player2Score, SpaceInvaders.pPlayer2Score);
            FontManager.Update(Font.Name.HiScore, SpaceInvaders.pHiScore);
            FontManager.Update(Font.Name.Lives, ScenePlay.ShipLives.ToString());

            this.RunTime = Simulation.GetTotalTime() - ScenePlay.StartTimeDelta;
            //Debug.WriteLine(this.RunTime);

            TimerManager.Update(this.RunTime);
            GameObjectManager.Update();
            //Collision Checks
            CollisionPairManager.Process();
            // Delete any objects here...
            DelayedObjectManager.Process();

            //check if all alien killed
            AlienGrid pGrid = (AlienGrid)GameObjectManager.Find(GameObject.Name.AlienGrid);

            if (pGrid.GetAlienCount() < 1)
            {
                pGrid.IncreaseStartRate();
                this.ResetAll();
            }
        }
示例#2
0
        //-----------------------------------------------------------------------------
        // Game::Update()
        //      Called once per frame, update data, tranformations, etc
        //      Use this function to control process order
        //      Input, AI, Physics, Animation, and Graphics
        //-----------------------------------------------------------------------------
        public override void Update()
        {
            // Sound Engine update - keeps everything moving and updating smoothly
            SoundEngineManager.GetSoundEngine().Update();

            // Input
            InputManager.Update();

            // Fire off the timer events
            TimerManager.Update(GameStateManager.GetGame().GetTime());

            // Update all objects
            this.pGameObjectManager.Update();

            // Process Collisions
            CollisionPairManager.Process();

            // Delete any objects here
            this.pDelayedObjectManager.Process();

            // Chage State if flag is true
            if (this.changeState)
            {
                this.Handle(GameStateManager.GetGame());
                this.changeState = false;
            }
        }
示例#3
0
文件: Game.cs 项目: ccaunca/Projects
 //-----------------------------------------------------------------------------
 // Game::Update()
 //      Called once per frame, update data, tranformations, etc
 //      Use this function to control process order
 //      Input, AI, Physics, Animation, and Graphics
 //-----------------------------------------------------------------------------
 public override void Update()
 {
     TimerManager.Update(this.GetTime());
     InputManager.Update();
     GameObjectManager.Update();
     CollisionPairManager.Process();
     SoundManager.GetEngine().Update();
     DelayedGameObjectManager.Process();
 }