Пример #1
0
        public override void Update(GameTime gameTime)
        {
            buttonsEnterScreenAnimation.Update(gameTime);
            clickEffect.Update(gameTime);

            leafParticleEffectTree1?.Update(gameTime);
            leafParticleEffectTree2?.Update(gameTime);

            if (!this.ChangingScene)
            {
                buttonCampaign.Update(this, gameTime);
                buttonFreePlay.Update(this, gameTime);
                buttonSettings.Update(this, gameTime);
            }

            base.Update(gameTime);
        }
Пример #2
0
        public override void Update(GameTime gameTime)
        {
            if (!ContentLoader.Done)
            {
                return;
            }

            if (starParticleEffect == null)
            {
                starParticleEffect = new StarParticleEffect(this);
            }
            if (leafParticleEffectTree1 == null)
            {
                leafParticleEffectTree1 = new LeafParticleEffect(this);
            }
            if (leafParticleEffectTree2 == null)
            {
                leafParticleEffectTree2 = new LeafParticleEffect(this);
            }

            starParticleEffect?.Update(gameTime);
            leafParticleEffectTree1?.Update(gameTime);
            leafParticleEffectTree2?.Update(gameTime);
            loadingBgMoveIn.Update(gameTime);

            if (nextScene == null && ContentLoader.Done)
            {
                nextScene = new WorldMapScene();
            }
            if (nextScene != null && elapsedTime >= minimumDisplayDuration)
            {
                this.SwitchSceneTo(nextScene);
            }

            base.Update(gameTime);
        }