public void AddHandleListener(Type packetType,OnHanldePacketData handleFunction)
 {
     PacketHandle handle = new PacketHandle();
     handle.packetType = packetType;
     handle.handleFuntion = handleFunction;
     mListPacketDataHandle.Add(handle);
 }
Ejemplo n.º 2
0
    public void AddHandleListener(Type packetType, OnHanldePacketData handleFunction)
    {
        PacketHandle handle = new PacketHandle();

        handle.packetType    = packetType;
        handle.handleFuntion = handleFunction;
        mListPacketDataHandle.Add(handle);
    }
Ejemplo n.º 3
0
    public void RemoveHandleListener(OnHanldePacketData handleFunction)
    {
        for (int i = 0; i < mListPacketDataHandle.Count; i++)
        {
            PacketHandle handle = mListPacketDataHandle[i];

            if (handle.handleFuntion == handleFunction)
            {
                mListPacketDataHandle.Remove(handle);
            }
        }
    }
    public void RemoveHandleListener(OnHanldePacketData handleFunction)
    {
        for (int i = 0; i < mListPacketDataHandle.Count; i++)
        {
            PacketHandle handle = mListPacketDataHandle[i];

            if (handle.handleFuntion ==handleFunction)
            {
                mListPacketDataHandle.Remove(handle);
            }
        }
    }
 public void AddHandleListener <T>(OnHanldePacketData handleFunction)
 {
     AddHandleListener(typeof(T), handleFunction);
 }