public static void Postfix(RoundDisplay __instance) { if (currentBossHealth > 0) { // Sets the round display to show the boss name, health, and the round __instance.text.text = bossName + " - " + currentBossHealth + " " + (InGame.instance.bridge.GetCurrentRound() + 1) + "/80"; __instance.text.color = color; } }
public void ShowRounds() { RoundList.Items.Clear(); RoundDisplay l; foreach (BeeRound round in Bee.Rounds) { l = new RoundDisplay() { DataContext = round }; RoundList.Items.Add(l); } }
protected IEnumerator Start() { // If not coming from Lobby if (mode == Modes.UNESPECIFIED) { // Play game music UIMaster.PlayMusic(UIMaster.Musics.Game); // Set correct mode, so testing works string modeName = manager.GetType().Name; mode = (Modes)Enum.Parse(typeof(Modes), modeName); } // Reset game stats for both players Player.Get(1).ranking = new GameStats(); Player.Get(2).ranking = new GameStats(); // Start rounds for (int round = 1; round <= rounds; round++) { stopped = true; // Display round info yield return(RoundDisplay.Show(round, roundWinner)); roundWinner = -1; stopped = false; // Start actual game mode logic var logic = StartCoroutine(Logic()); // Wait until winner is proclaimed while (roundWinner == -1) { yield return(null); } StopCoroutine(logic); } // At the end of the game stopped = true; UIMaster.PlayEffect(UIMaster.SFx.Whistle); yield return(new WaitForSeconds(1f)); StartCoroutine(ResetStage()); UIMaster.ShowRanking(); }
void Start () { _instance = this; off(); }