Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
        public override void Update(float systemTime)
        {
            // Single Step, Free running...
            Simulation.Update(systemTime);

            // Handels Keyboard input
            InputManager.Update();

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


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


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


                // Delete any objects here...
                DelayedObjectManager.Process();

                // Check to see if all aliens are dead to move to the next level.
                Level.Update();
            }
        }
Exemplo n.º 3
0
        //-----------------------------------------------------------------------------
        // Game::Draw()
        //		This function is called once per frame
        //	    Use this for draw graphics to the screen.
        //      Only do rendering here
        //-----------------------------------------------------------------------------
        public override void Draw()
        {
            //-----------------------------------------------
            //sprites
            //SpriteBatchManager.renderBoxes = true;

            //draw all the sprites attached to sprite batches
            SpriteBatchManager.Draw();

            // Delete any objects here...
            DelayedObjectManager.Process();
        }
Exemplo n.º 4
0
        // Should be called during the Update part of gameloop
        public override void Update(GameManager pGameManager)
        {
            // Debug.WriteLine("Tick" + this.GetTime());
            InputManager.Update();

            // Sprite animations and motions being handled in TimerManger
            TimerManager.Update(pGameManager.pGame.GetTime());

            // Pushes updates from Gameobjects to proxysprites
            GameObjectManager.Update();

            ColPairManager.Process();

            DelayedObjectManager.Process();

            pGameManager.HandleEndOfPlayerTurn();
        }
Exemplo n.º 5
0
 // Should be called during the Update part of gameloop
 public override void Update(GameManager pGameManager)
 {
     InputManager.Update();
     DelayedObjectManager.Process();
 }