Ejemplo n.º 1
0
    // ------ 反注册分发入口
    public void unregisterEventObject(string tag, BaseEventObject obj)
    {
        List <BaseEventObject> tempList;

        if (dispatchTable.ContainsKey(tag))
        {
            tempList = dispatchTable[tag];
            tempList.Remove(obj);
            dispatchTable[tag] = tempList;
        }
    }
Ejemplo n.º 2
0
    // ------ 注册分发入口
    public void registerEventObject(string tag, BaseEventObject obj)
    {
        List <BaseEventObject> tempList;

        if (dispatchTable.ContainsKey(tag))
        {
            tempList = dispatchTable[tag];
        }
        else
        {
            tempList = new List <BaseEventObject>();
        }
        tempList.Add(obj);
        dispatchTable[tag] = tempList;
    }