Example #1
0
        void OnHeroDeath(HeroDeathEventInfo heroDeathEventInfo)
        {
            Debug.Log("BattleUIController Alerted to Hero Death!");

            // Close all existing windows
            ActionPanel.SetActive(false);
            MenuPanel.SetActive(false);
            // Open GameOver Window
            GameOverPanel.SetActive(true);

            GameOverPanel.GetComponentInChildren <Button>().onClick.AddListener(GameOverButtonPressed);
        }
Example #2
0
        public void UnregisterEventCallbacks()
        {
            SelectedObjectEventInfo.UnregisterListener(OnHighlightSelected);
            CharacterReadyEventInfo.UnregisterListener(OnCharacterReady);

            BattleWonEventInfo.UnregisterListener(OnBattleWon);
            HPChangedEventInfo.UnregisterListener(OnHPChange);
            MPChangedEventInfo.UnregisterListener(OnMPChange);
            HeroDeathEventInfo.UnregisterListener(OnHeroDeath);
            DeathEventInfo.UnregisterListener(OnUnitDied);
            UnitSpawnEventInfo.UnregisterListener(OnUnitSpawn);
        }