/// <summary>
        /// Update the state of the background screen.
        /// </summary>
        /// <param name="gameTime">Current time of the game.</param>
        /// <param name="otherScreenHasFocus">true if other screen has the focus, false otherwise.</param>
        /// <param name="coveredByOtherScreen">true if other screen cover this screen, false otherwise.</param>
        public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            base.Update(gameTime, otherScreenHasFocus, false);

            _animationRing1.Update(gameTime.ElapsedGameTime);
            _animationRing2.Update(gameTime.ElapsedGameTime);

            _individualTransformations["polySurface26"] = Matrix.CreateRotationY(_animationRing1.Rotation.Y);
            _individualTransformations["polySurface27"] = Matrix.CreateRotationY(_animationRing2.Rotation.Y);
        }
Esempio n. 2
0
        /// <summary>
        /// Update the state of the screen.
        /// </summary>
        /// <param name="gameTime">Current time of the game.</param>
        /// <param name="otherScreenHasFocus">true if other screen has the focus, false otherwise.</param>
        /// <param name="coveredByOtherScreen">true if other screen cover this screen, false otherwise.</param>
        public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);

            // Update the transition
            float transitionOffset = (float)Math.Pow(TransitionInstant, 2);

            if (ScreenState == ScreenState.TransitionOn)
            {
                _currentPosition.X -= transitionOffset * 256;
            }
            else
            {
                _currentPosition.X += transitionOffset * 512;
            }

            _animation.Update(gameTime.ElapsedGameTime);
            _model.Rotation = new Vector3(_animation.Rotation.X, _model.Rotation.Y, _model.Rotation.Z);
        }
Esempio n. 3
0
 public override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
     Animation.Update(gameTime, this);
 }