Beispiel #1
0
        public void RemoveCallback <T>(Action <T> callback) where T : new()
        {
            Type          type = typeof(T);
            ProtoItem <T> item = (ProtoItem <T>)protoListListener.GetItemByType(type);

            item.OnClientReceiveOnce -= callback;
        }
Beispiel #2
0
        public void RemoveCallback <T>(Action <T, NetworkingPlayer> callback) where T : new()
        {
            Type          type = typeof(T);
            ProtoItem <T> item = (ProtoItem <T>)protoListListener.GetItemByType(type);

            item.OnServerReceiveOnce -= callback;
        }
Beispiel #3
0
        /** 添加监听 */
        public void AddCallback <T>(Action <int, T> callback) where T : new()
        {
            Type          type = typeof(T);
            ProtoItem <T> item = (ProtoItem <T>)protoListListener.GetItemByType(type);

            item.OnClientReceiveTwo += callback;
        }