Esempio n. 1
0
 public void OnCancelButtonClicked()
 {
     gameObject.SetActive(false);
     if (OnCancelButtonPressedEventHandler != null)
     {
         OnCancelButtonPressedEventHandler.Invoke(this, new EventArgs());
     }
     CleanDelegate();
 }
Esempio n. 2
0
        private void CleanDelegate()
        {
            if (OnOkayButtonPressedEventHandler != null)
            {
                foreach (Delegate d in OnOkayButtonPressedEventHandler.GetInvocationList())
                {
                    OnOkayButtonPressedEventHandler -= (EventHandler)d;
                }
            }

            if (OnCancelButtonPressedEventHandler != null)
            {
                foreach (Delegate d in OnCancelButtonPressedEventHandler.GetInvocationList())
                {
                    OnCancelButtonPressedEventHandler -= (EventHandler)d;
                }
            }
        }