public void RegEvent(string tag, NetEventRecv action) { if (Events.ContainsKey(tag)) { Events.Remove(tag); } Type type = tag.GetType(); NetEventHandler net_event = new NetEventHandler(type, action); Events.Add(tag, net_event); }
public NetEventHandler(Type t, NetEventRecv recv) { this.eventType = t; this.recv = recv; }