Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 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;
        }