Beispiel #1
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);
        }
Beispiel #2
0
 protected void SwitchSceneTo(BaseScene scene)
 {
     loadingScene = scene;
 }