int Comparision(UIComponent a, UIComponent b) { return b.Order.CompareTo(a.Order); }
public void Back() { NextScreen = dummyScreen; }
protected void AddElement(UIComponent con) { subElements.Add(con); }
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(); } } } }