Example #1
0
    protected void Replay()
    {
        // Dont check mana
        if (true)
        {
            // Hide
            Hide(false, GameManager.Instance.Replay);
        }
        else
        {
            if (noMoreManaPopupPrefab != null)
            {
                // Create popup
                GameObject            noMoreManaPopup = noMoreManaPopupPrefab.CreateUI(transform.parent);
                NoMoreManaPopupScript script          = noMoreManaPopup.GetComponent <NoMoreManaPopupScript>();

                if (script != null)
                {
                    NotificationManager.AddManaEventHandler(OnManaChanged);

                    script.Show(null);
                }
            }
            else
            {
                //Log.Debug("No more mana!");
            }
        }
    }
Example #2
0
    void OnEnable()
    {
        NotificationManager.AddManaEventHandler(OnManaChanged);
        NotificationManager.AddCoinEventHandler(OnCoinChanged);

        map.AddEventHandler(OnMapSelected);

        KeyManager.AddBackEventHandler(OnKeyBack);
    }
Example #3
0
 void Awake()
 {
     NotificationManager.AddManaEventHandler(OnManaChanged);
 }