Esempio n. 1
0
 int Comparision(UIComponent a, UIComponent b) 
 {
     return b.Order.CompareTo(a.Order);
 }
Esempio n. 2
0
 public void Back() 
 {
     NextScreen = dummyScreen;
 }
Esempio n. 3
0
 protected void AddElement(UIComponent con)
 {
     subElements.Add(con);
 }
Esempio n. 4
0
        public override void Update(GameTime time)
        {
            if (intro != null)
            {
                intro.Update(time);
                if (intro.IsOver)
                {
                    intro.Dispose();
                    intro = null;
                }
            }
            else
            {

                if (nextScreen != null)
                {
                    overlayAlpha += time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha > 1)
                    {
                        CurrentScreen = nextScreen;
                        nextScreen = null;
                        overlayAlpha = 1;
                    }
                }
                else 
                {
                    overlayAlpha -= time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha < 0)
                        overlayAlpha = 0;

                }
                
                loadingOverlay.Update(time);
                if (!game.IsIngame)
                {
                    //UpdateScene(time);
                    if (currentScreen != null && dummyScreen != currentScreen)
                    {
                        currentScreen.Update(time);
                    }
                    else
                    {
                        mainMenu.Update(time);
                    }
                }
                else
                {
                    if (game.CurrentGame.IsOver)
                    {
                        //ShowScore(game.CurrentGame.ResultScore);
                        game.Back();
                    }
                }
            }
        }