Beispiel #1
0
            protected override void Update(Microsoft.Xna.Framework.GameTime gameTime)
            {
                if (firstTime)
                {
                    bet.InitOrRestart(gameTime);
                    firstTime = false;
                }


                if (bet.hasPassed(gameTime))
                {
                    i += 1;
                    if (i == IScreen.Count)
                    {
                        Environment.Exit(0);
                    }
                    ScreenManager.AddScreen(IScreen[i]);
                    TimePassed.InitOrRestart(gameTime);
                    ActiveLogger.LogMessage("Added Screen: " + IScreen[i].GetType().AssemblyQualifiedName, LogLevel.Info);
                    if (pathToScreenShot != null)
                    {
                        takeScreen = true;
                    }
                }

                if (TimePassed.hasPassed(gameTime))
                {
                    ScreenManager.RemoveScreen(IScreen[i]);
                    bet.InitOrRestart(gameTime);
                    ActiveLogger.LogMessage("Removed Screen: " + IScreen[i].GetType().AssemblyQualifiedName, LogLevel.Info);

                    foreach (var item in contentManager.DumpAssetReferenceCount())
                    {
                        ActiveLogger.LogMessage("Assets Dump: " + item.Key + " : " + item.Value, LogLevel.Info);
                    }

                    System.Diagnostics.Debug.Assert(contentManager.DumpAssetReferenceCount().Count == 0);
                }

                base.Update(gameTime);
            }