// UnBind Action internal void UnBindAction(ActionAlwaysHandler m_Handler) { if (alwaysHandler == m_Handler) { alwaysHandler -= m_Handler; useAlways = (clickHandler != null); } }
// Bind Action internal void BindAction(ActionAlwaysHandler m_Handler) { useAlways = true; if (alwaysHandler != m_Handler) { alwaysHandler += m_Handler; } }
/// <summary> /// Bind your void to button update, identified by buttonName. Always called. /// </summary> /// <param name="buttonName"></param> /// <param name="m_Handler"></param> public static void BindAction(string buttonName, ActionAlwaysHandler m_Handler) { foreach (TCKButton button in buttons) { if (button.MyName == buttonName) { button.BindAction(m_Handler); return; } } Debug.LogError("Button: " + buttonName + " Not Found."); }