public void AnimationOver(UIAnimation.UIAnimationEvent _event) { switch (_event.identifier) { case 1: _active("menu", true); ButtonInteractive("menu", true); FindFiller("menu_shop").Reset(); FindFiller("menu_start").Reset(); FindFiller("menu_claw").Reset(); anim.Open("menu", 0); break; case 3: animFramework.TextValue(gameoverScoreText, "Score\n<size=60%>{0}", 0, (int)(App.Instance.Score), 1f, 0f); animFramework.TextValue(gameoverCoin, "<sprite=6> {0}", 0, App.Instance.coinsEarned, 1); break; case 4: anim.Open("settings_cg", 7); ButtonInteractive("settings", true); break; case 7: anim.Open("settings", 0); musicToggle.SetValue(App.Instance.settings.musicEnabled); soundToggle.SetValue(App.Instance.settings.sfxEnabled); notificationToggle.SetValue(App.Instance.settings.notification); break; case 5: anim.Close("settings_cg", 6); break; case 6: _active("menu", true); _active("settings", false); ButtonInteractive("menu", true); anim.Open("menu", 0); break; case 8: //coin anim UpdateShopCoin(); break; case 9: anim.Open("claw", 0); break; } }
public void StartGameoverTextEffect(UIAnimation.UIAnimationEvent _event) { if (_event.opened && _event.name == UIType.gameover.ToString()) { float time = 2f; int add = (100 * App.Instance.player.Health + ((App.Instance.player.Health - 1) * 50)); App.Instance.Score += add; string score = (App.Instance.Score > App.Instance.playerVar.highscore) ? "New highscore" : "Score"; effects.TextValue(gameoverScore, score + ": {0}", 0, App.Instance.Score, time); effects.TextValue(gameoverMoney, "Money Earned: {0}", 0, App.Instance.moneyEarned, time * 0.9f); effects.TextValue(gameoverEnemiesKilled, "Enemies Killed: {0}", 0, App.Instance.enemiesKilled, time * 0.5f); effects.TextValue(gameoverHighestStreak, "Highest Streak: {0}", 0, App.Instance.highestStreak, time * 0.45f); } }