Exemple #1
0
        public void Update(float deltaTime)
        {
            if (NextStage != null)
            {
                if (currentStage != null)
                {
                    currentStage.Dispose();
                }

                if (NextStage == "Exit")
                {
                    Game1.Singleton.Exit();
                    return;
                }
                else
                {
                    currentStage = Get(NextStage);
                    if (currentStage != null)
                    {
                        currentStage.Init();
                    }

                    NextStage = null;
                }
            }

            if (currentStage != null)
            {
                currentStage.Update(deltaTime);
            }
        }
Exemple #2
0
 public void Add(string stageName, Stage stage)
 {
     stages[stageName] = stage;
 }
Exemple #3
0
 public void Add(string stageName, Stage stage)
 {
     stages[stageName] = stage;
     Game1.Singleton.KeyboardState = new Microsoft.Xna.Framework.Input.KeyboardState();
     Game1.Singleton.InputLocked = true;
 }