public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (!_currentScoreModifier._done)
            {
                _currentScoreModifier.Update(gameTime);
            }
            if (!_totalScoreModifier._done)
            {
                _totalScoreModifier.Update(gameTime);
            }

            if (_currentMedalSprite != null)
            {
                _currentMedalSprite.Update(gameTime);
            }
        }
Пример #2
0
        public override void Update(GameTime gameTime)
        {
            if (_done || Pax4Game._pause || _timerDisabled)
            {
                return;
            }

            if (_timer > 0.0f)
            {
                _timer -= (float)gameTime.ElapsedGameTime.TotalSeconds;

                _alarm = false;
                if (_timer <= 20.0f && ((int)_timer) % 2 == 0)
                {
                    if (_timer1)
                    {
                        ((Pax4SoundLavaAndIce)Pax4Sound._current)._lavaandiceTimer1.Play();
                        _timer1 = false;
                    }

                    if (_timer <= 8.5f && _timer2)
                    {
                        ((Pax4SoundLavaAndIce)Pax4Sound._current)._lavaandiceTimer2.Play();
                        _timer2 = false;
                    }

                    _alarm = true;

                    if (_timer > 10.0f)
                    {
                        _alarmSprite = _alarmSpriteYellow;
                    }
                    else
                    {
                        _alarmSprite = _alarmSpriteRed;
                    }
                }

                if (_timer <= 0.0f)
                {
                    _timer = 0.0f;
                    _alarm = true;
                }

                ((Pax4SpriteText)_timerValue).SetText(Pax4Tools.FloatSecondsToMinutesSeconds(_timer));
            }
            else
            {
                _done = true;
            }

            if (_normalSprite != null)
            {
                _normalSprite.Update(gameTime);
            }

            if (_alarm && _alarmSprite != null)
            {
                _alarmSprite.Update(gameTime);
            }

            if (_timerValue != null)
            {
                _timerValue.Update(gameTime);
            }
        }
Пример #3
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            _currentMedalSprite.Update(gameTime);
        }