public void AddHandleListener(Type packetType,OnHanldePacketData handleFunction) { PacketHandle handle = new PacketHandle(); handle.packetType = packetType; handle.handleFuntion = handleFunction; mListPacketDataHandle.Add(handle); }
public void AddHandleListener(Type packetType, OnHanldePacketData handleFunction) { PacketHandle handle = new PacketHandle(); handle.packetType = packetType; handle.handleFuntion = handleFunction; mListPacketDataHandle.Add(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 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); }