コード例 #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;
        }
コード例 #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;
        }
コード例 #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;
        }