//Second in animation row //UI updates should go in here private void FadeInOver() { if (lastObj != null) { lastObj.SetActive(false); } switch (openNext) { case UIType.menu: menu.SetActive(true); lastObj = menu; OnMenuUI(); break; case UIType.game: game.SetActive(true); lastObj = game; OnGameUI(); break; case UIType.gameover: gameover.SetActive(true); lastObj = gameover; OnGameoverUI(); break; case UIType.upgrades: OnUpgradeUI(); upgrades.SetActive(true); lastObj = upgrades; break; case UIType.settings: OnSettingsUI(); settings.SetActive(true); lastObj = settings; break; case UIType.tutorial: OnTutorialUI(); tutorial.SetActive(true); lastObj = tutorial; break; } effects.Fade(fadeImage, Color.clear, FADETIME, 0, FadeOutOver); }
public void ShowShop(string scene) { AudioController.PlaySound(App.Instance.soundDB.Click()); anim.Close(scene, 0); ButtonInteractive(scene, false); shopOpen = scene + "_shop"; ButtonScreenFill f = FindFiller(shopOpen); animFramework.Scale(f.fill, f.size, 0.5f, 0.05f, ShopFillOver); animFramework.Fade(f.image, f.on, 0.5f, 0.05f); f.icon.SetActive(false); }