Esempio n. 1
0
 private void OnMessage(UIButtonMessage message)
 {
     if (ListenForAllUIButtons ||
         message.Button != null && message.Button.ButtonCategory.Equals(ButtonCategory) && message.Button.ButtonName.Equals(ButtonName))
     {
         InvokeEvent(message);
     }
 }
Esempio n. 2
0
 private void InvokeEvent(UIButtonMessage message)
 {
     if (Event == null)
     {
         return;
     }
     if (TriggerAction != message.Type)
     {
         return;
     }
     Event.Invoke(message.Button);
     if (DebugMode)
     {
         DDebug.Log("[" + name + "] Triggered Event: " + "[" + message.Type + "] " + (message.Button != null
                                                                                          ? (message.Button.ButtonCategory + " - " + message.Button.ButtonName)
                                                                                          : message.ButtonName),
                    this);
     }
 }
Esempio n. 3
0
        private void OnMessage(UIButtonMessage message)
        {
            if (m_listeningForBackButton && (message.ButtonName.Equals(UIButton.BackButtonName) || message.Button != null && message.Button.IsBackButton))
            {
                InvokeEvent(message);
                return;
            }

            if (ListenForAllUIButtons)
            {
                InvokeEvent(message);
                return;
            }

            if (message.Button != null && message.Button.ButtonCategory.Equals(ButtonCategory) && message.Button.ButtonName.Equals(ButtonName))
            {
                InvokeEvent(message);
            }
        }