Exemplo n.º 1
0
    public void UnRegAll()
    {
        for (int i = 0; i < mCBLis.Count; i++)
        {
            MsgCBStruct msg = mCBLis[i];
            mDispatchEvent.UnReg(msg.eventID, msg.CallBack);
        }

        mCBLis.Clear();
    }
Exemplo n.º 2
0
    public void UnReg(int eventID)
    {
        for (int i = mCBLis.Count - 1; i >= 0; i--)
        {
            MsgCBStruct msg = mCBLis[i];
            if (msg.eventID == eventID)
            {
                mCBLis.RemoveAt(i);
            }
        }

        mDispatchEvent.UnReg(eventID);
    }
Exemplo n.º 3
0
    public void UnReg(int eventID, GameEventDelegate.CallBack callBack)
    {
        for (int i = 0; i < mCBLis.Count; i++)
        {
            MsgCBStruct msg = mCBLis[i];
            if (msg.eventID == eventID && msg.CallBack == callBack)
            {
                mCBLis.RemoveAt(i);
                break;
            }
        }

        mDispatchEvent.UnReg(eventID, callBack);
    }