Exemple #1
0
    /// <summary>
    /// regist the event .
    /// </summary>
    /// <param name="obj"></param>
    /// <param name="callback"></param>
    /// <param name="arg"></param>
    protected void Regist(GameObject obj, UIEvent.OnCallBack callback, object[] arg)
    {
        UIEvent uiEvent = obj.AddComponent <UIEvent>();

        uiEvent.m_cEvent = callback;
        uiEvent.m_vecArg = arg;
    }
Exemple #2
0
 /// <summary>
 /// regist the gameobject event.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="callback"></param>
 /// <param name="arg"></param>
 public void RegistEvent(GameObject obj, UIEvent.OnCallBack callback, params object[] arg)
 {
     Regist(obj, callback, arg);
 }
Exemple #3
0
//========================= UI EVENT Regist Function ==================================

    /// <summary>
    /// regist the mono event.
    /// </summary>
    /// <param name="mono"></param>
    /// <param name="callback"></param>
    /// <param name="arg"></param>
    public void RegistEvent(MonoBehaviour mono, UIEvent.OnCallBack callback, params object[] arg)
    {
        Regist(mono.gameObject, callback, arg);
    }