Example #1
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                Exit();
            }

            if (MediaPlayer.State == MediaState.Stopped)
            {
                MediaPlayer.Play(song);
            }

            if (collisionDetectionSystem.CollisionOccured)
            {
                if (count <= 0)
                {
                    ResetGame();
                    count = 5;
                }
                count -= gameTime.ElapsedGameTime.TotalSeconds;
            }
            else
            {
                // TODO: Add your update logic here
                collisionDetectionSystem.Update(gameTime);
                physicsSystem.Update(gameTime);
                spawnSystem.Update(gameTime);
                inputSystem.Update(gameTime);
                scoreSystem.Update(gameTime);
            }


            base.Update(gameTime);
        }
Example #2
0
 //Game Logic Stuff
 public void Update(float deltaTime)
 {
     velZeroSystem.Update(deltaTime);
     timerSystem.Update(deltaTime);
     moveSystem.Update(deltaTime);
     bkgPosSystem.Update(deltaTime);
     pushSystem.Update(deltaTime);
     movPlatSystem.Update(deltaTime);
     scrEdgeSystem.Update(deltaTime);
     playerSystem.Update(deltaTime);
     visSystem.Update(deltaTime);
     grapSystem.Update(deltaTime);
     timedShooterSystem.Update(deltaTime);
     spSystem.Update(deltaTime);
     weapSystem.Update(deltaTime);
     colSystem.Update(deltaTime);
     gravSystem.Update(deltaTime);
     drawSystem.Update(deltaTime);
     healthSystem.Update(deltaTime);
     animSystem.Update(deltaTime);
     squishSystem.Update(deltaTime);
     slSystem.Update(deltaTime);
     switchSystem.Update(deltaTime);
     simpEnemySystem.Update(deltaTime);
     smushSystem.Update(deltaTime);
     signSystem.Update(deltaTime);
     debugSystem.Update(deltaTime);
     inputSystem.Update(deltaTime);
 }
Example #3
0
 //Game Logic Stuff
 public void Update(float deltaTime)
 {
     moveSystem.Update(deltaTime);
     colSystem.Update(deltaTime);
     drawSystem.Update(deltaTime);
     inputManSystem.Update(deltaTime);
     inputSystem.Update(deltaTime);
     protEntSystem.Update(deltaTime);
 }
Example #4
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (!collisionDetectionSystem.CollisionOccured)
            {
                Console.WriteLine("Colliding");
            }



            // TODO: Add your update logic here
            inputSystem.Update(gameTime);
            physicsSystem.Update(gameTime);
            collisionDetectionSystem.Update(gameTime);
            base.Update(gameTime);
        }