Update() public method

public Update ( ) : void
return void
Beispiel #1
0
        public void Update(GameTime gameTime)
        {
            Time.Update(gameTime);

            ambientalLightShader.Update(Time.Value);

            sky.Update(Time);
            stars.Update(Time);
            moon.Update(Time);
            sun.Update(Time);

            clouds.Update(Lights);
        }
Beispiel #2
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 || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            // TODO: Add your update logic here
            menu.Update();
            controll.Update();
            soldier.Update();
            effects.Update();
            if (soldiers.Game == 4)
            {
                clouds.Update();
                map.Update();
            }

            base.Update(gameTime);
        }
Beispiel #3
0
        public override void Update(double delta)
        {
            base.Update(delta);
            clouds.Update();
            if (Appearing || !spacePressed)
            {
                return;
            }
            timer.Update(delta);
            if (message != null)
            {
                message.Update(delta);
            }
            if (timer.Time > 1000)
            {
                return;
            }
            var alpha = Utility.Lerp(timer.Time / 1000, 1, 0);

            title.Alpha    = alpha;
            subTitle.Alpha = alpha;
        }