예제 #1
0
        protected override void onInit(Variant parma)
        {
            this.g_gameM.dispatchEventCL("LG_OUT_GAME", GameEvent.Create(3060u, this, null, false));
            connInfo connInfo = this.g_netM.getObject("DATA_CONN") as connInfo;

            connInfo.setInfo(parma);
        }
예제 #2
0
        private void _connect()
        {
            _setConnFlag = true;
            connInfo info = this.g_mgr.g_netM.getObject(OBJECT_NAME.DATA_CONN) as connInfo;

            bool ipv6 = false;

            IPAddress[] address = Dns.GetHostAddresses(info.server_ip);
            if (address[0].AddressFamily == AddressFamily.InterNetworkV6)
            {
                ipv6 = true;
            }

            this.g_mgr.g_netM.connect(
                info.server_ip,
                info.server_port,
                info.uid,
                info.token,
                info.clnt,
                info.keyt,
                ipv6
                );

            debug.Log("链接服务器" + "server_id=" + info.server_ip + " server_port=" + info.server_port + " uid=" + info.uid + " ipv6" + ipv6);
        }
예제 #3
0
        override protected void onInit(Variant parma)
        {
            g_gameM.dispatchEventCL(
                OBJECT_NAME.LG_OUT_GAME,
                GameEvent.Create(GAME_EVENT.GAME_INIT_START, this, null)
                );

            connInfo cinfo = g_netM.getObject(OBJECT_NAME.DATA_CONN) as connInfo;

            cinfo.setInfo(parma);
        }
예제 #4
0
        public virtual void stopVoice(string path)
        {
            connInfo info = NetClient.instance.getObject(OBJECT_NAME.DATA_CONN) as connInfo;
            Variant  v    = new Variant();

            v["sid"] = Globle.curServerD.sid;

            v["platid"] = Globle.YR_srvlists__platuid;
            v["uid"]    = PlayerModel.getInstance().uid;
            v["token"]  = info.token == "" ? "76b03211848f7db9b922a39fbe1d1978_2015-09-26 15:11:20-100000503" : info.token;
            v["url"]    = path;
            string voicejsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("stopVoice", "lanVoice", voicejsonString, false);
        }
예제 #5
0
        public virtual void endVoiceRecord()
        {
            if (!recordingVoice)
            {
                return;
            }

            recordingVoice = false;
            connInfo info = NetClient.instance.getObject(OBJECT_NAME.DATA_CONN) as connInfo;
            Variant  v    = new Variant();

            v["sid"] = Globle.curServerD.sid;

            v["platid"] = Globle.YR_srvlists__platuid;
            v["uid"]    = PlayerModel.getInstance().uid;
            v["token"]  = info.token == "" ? "76b03211848f7db9b922a39fbe1d1978_2015-09-26 15:11:20-100000503" : info.token;
            v["url"]    = m_voice_url;
            string voicejsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("finishRecord", "lanVoice", voicejsonString, false);

            // recordingVoice = false;
        }