Ejemplo n.º 1
0
        public override void record_quit()
        {
            bool flag = Globle.Lan != "zh_cn";

            if (!flag)
            {
                Variant variant = new Variant();
                variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid;

                variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

                variant["roleLevel"] = ModelBase <PlayerModel> .getInstance().lvl;

                variant["roleGold"] = ModelBase <PlayerModel> .getInstance().gold;

                variant["roleleveluptime"] = "";
                variant["rolecreatetime"]  = "";
                variant["rolevip"]         = ModelBase <PlayerModel> .getInstance().vip;

                variant["roleYb"] = ModelBase <PlayerModel> .getInstance().money;

                variant["roleServerId"]   = Globle.curServerD.sid;
                variant["roleServerName"] = Globle.curServerD.server_name;
                string text = JsonManager.VariantToString(variant);
                AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", text, false);
                debug.Log("[record]quit:" + text);
            }
        }
Ejemplo n.º 2
0
        public override void record_quit()
        {
            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]        = Globle.curServerD.sid;
            v["roleServerName"]      = Globle.curServerD.server_name;
            v["rolevip"]             = PlayerModel.getInstance().vip;
            v["roleLevelUpTime"]     = NetClient.instance.CurServerTimeStamp;
            v["rolePartyName"]       = "";
            v["rolePartyId"]         = PlayerModel.getInstance().clanid;
            v["rolePower"]           = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]     = "";
            v["rolePartyRoleName"]   = "";
            v["roleProfessionId"]    = PlayerModel.getInstance().profession;
            v["roleProfession"]      = "";
            v["roleFriendlist"]      = "";
            v["rolePartyMasterID"]   = "";
            v["rolePartyMasterName"] = "";
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]exitPage:" + serverInfoJsonString);
        }
Ejemplo n.º 3
0
        public override void record_login()
        {
            Variant variant = new Variant();

            variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid;

            variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

            variant["roleLevel"] = this.getlv(ModelBase <PlayerModel> .getInstance().up_lvl, ModelBase <PlayerModel> .getInstance().lvl);
            variant["roleGold"]  = ModelBase <PlayerModel> .getInstance().money;

            variant["roleYb"] = ModelBase <PlayerModel> .getInstance().gold;

            variant["roleCreateTime"] = ModelBase <PlayerModel> .getInstance().crttm;

            variant["roleServerId"]   = Globle.curServerD.sid;
            variant["roleServerName"] = Globle.curServerD.server_name;
            variant["rolevip"]        = ModelBase <PlayerModel> .getInstance().vip;

            variant["rolePartyName"] = "";
            variant["rolePartyId"]   = ModelBase <PlayerModel> .getInstance().clanid;

            variant["rolePower"] = ModelBase <PlayerModel> .getInstance().combpt;

            variant["rolePartyRoleId"]   = "";
            variant["rolePartyRoleName"] = "";
            variant["roleProfessionId"]  = ModelBase <PlayerModel> .getInstance().profession;

            variant["roleProfession"] = "";
            variant["roleFriendlist"] = "";
            string text = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("enterGame", "lanRole", text, false);
            debug.Log("[record]login:" + text);
        }
Ejemplo n.º 4
0
        public override void record_quit()
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",
            // \"roleleveluptime\":\"1464537600\",\"roleCreateTime\":\"1464537600\",\"rolevip\":\"0\",
            // \"roleYb\":\"200\",\"roleServerId\":\"1\",\"roleServerName\":\"servername\"}";

            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = PlayerModel.getInstance().vip;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = PlayerModel.getInstance().clanid;
            v["rolePower"]         = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = PlayerModel.getInstance().profession;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";

            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]exitPage:" + serverInfoJsonString);
        }
Ejemplo n.º 5
0
        public override void Pay(rechargeData data)
        {
            debug.Log("begin-pay");
            Variant variant = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            variant["serverId"]   = Globle.curServerD.sid;
            variant["serverName"] = Globle.curServerD.server_name;
            variant["serverDesc"] = Globle.curServerD.sid;
            variant["roleId"]     = ModelBase <PlayerModel> .getInstance().cid;

            variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

            variant["productId"] = data.payid;
            debug.Log("rechargeData:" + ModelBase <RechargeModel> .getInstance().getRechargeDataById(data.id));
            debug.Log("name:" + data.name);
            variant["productName"]  = data.name;
            variant["productPrice"] = data.golden;
            variant["productCount"] = 1;
            variant["productDesc"]  = "description";
            variant["change_rate"]  = 0;
            variant["roleLvl"]      = ModelBase <PlayerModel> .getInstance().lvl;

            debug.Log("end-pay");
            string jstr = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", jstr, true);
        }
Ejemplo n.º 6
0
        public override void Pay(rechargeData data)
        {
            debug.Log("begin-pay");
            Variant v = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            v["serverId"]   = Globle.curServerD.sid;
            v["serverIds"]  = Globle.curServerD.sids;
            v["serverName"] = Globle.curServerD.server_name;
            v["serverDesc"] = Globle.curServerD.sid;
            v["roleId"]     = PlayerModel.getInstance().cid;
            v["roleName"]   = PlayerModel.getInstance().name;
            v["productId"]  = data.payid;
            debug.Log("rechargeData:" + RechargeModel.getInstance().getRechargeDataById(data.id));

            debug.Log("name:" + data.name);
            v["productName"]  = data.name;
            v["productPrice"] = data.golden;
            v["productCount"] = 1;
            v["productDesc"]  = "description";
            v["change_rate"]  = 0;
            v["productyb"]    = data.golden_value;

            debug.Log("end-pay");

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", LanPayInfoJsonString);
        }
        public override void record_quit()
        {
            if (Globle.Lan != "zh_cn")
            {
                return;
            }

            //string exitRoleInfoJsonString = "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"101\",\"roleGold\":\"300\",\"roleYb\":\"200\",\"roleServerId\":\"1\",\"roleServerName\":\"servername\"}";
            //AndroidJavaMethodInfoCall("lanRole", exitRoleInfoJsonString);
            //AndroidJavaMethodCall("exitPage");
            Variant v = new Variant();

            v["roleId"]          = PlayerModel.getInstance().cid;
            v["roleName"]        = PlayerModel.getInstance().name;
            v["roleLevel"]       = PlayerModel.getInstance().lvl;
            v["roleGold"]        = PlayerModel.getInstance().gold;
            v["roleleveluptime"] = "";
            v["rolecreatetime"]  = "";
            v["rolevip"]         = PlayerModel.getInstance().vip;
            v["roleYb"]          = PlayerModel.getInstance().money;
            v["roleServerId"]    = Globle.curServerD.sid;
            v["roleServerName"]  = Globle.curServerD.server_name;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]quit:" + serverInfoJsonString);
        }
Ejemplo n.º 8
0
        public virtual bool beginVoiceRecord()
        {
            if (recordingVoice)
            {
                return(false);
            }

            AnyPlotformSDK.Call_Cmd("startRecord", null, null, false);
            recordingVoice = true;
            return(true);
        }
 void onBtnQuitGame(GameObject go)
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         AnyPlotformSDK.Call_Cmd("close");
     }
     else
     {
         GameSdkMgr.record_quit();
     }
 }
Ejemplo n.º 10
0
 public void FrameMove()
 {
     if (m_nResetAppCount > 0)
     {
         m_nResetAppCount--;
         if (0 == m_nResetAppCount)
         {
             debug.Log("重启游戏APP");
             AnyPlotformSDK.Call_Cmd("resetapp");
         }
     }
 }
Ejemplo n.º 11
0
        public virtual void sharemsg(string sharemsg, string sharetype, string shareappid, string shareappkey)
        {
            Variant v = new Variant();

            v["sharemsg"]    = sharemsg;
            v["sharetype"]   = sharetype;
            v["shareappid"]  = shareappid;
            v["shareappkey"] = shareappkey;

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("gameShare", "lanShare", LanPayInfoJsonString, false);
        }
Ejemplo n.º 12
0
        public override void record_createRole(Variant data)
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",\"roleYb\":\"200\",
            // \"roleServerId\":\"1\",\"roleServerName\":\"servername\",\"rolevip\":\"1\",\"rolePartyName\":\"哈利噶多\",
            // \"rolePartyId\":\"123\",\"rolePower\":\"1234\",\"rolePartyRoleId\":\"1231\",\"rolePartyRoleName\":\"哈利波特\",
            // \"roleProfessionId\":\"12\",\"roleProfession\":\"无敌法师\",\"roleFriendlist\":\" \"}";

            Globle.YR_role_enter_time = Globle.getStrTimeNomal(NetClient.instance.CurServerTimeStamp);

            int    cid  = data["cid"];
            string name = data["name"];

            if (name.Length > 2)
            {
                name = name.Remove(name.Length - 2);
            }

            uint zhuan        = data["zhua"];
            uint lvl          = data["lvl"];
            int  professionId = data["carr"];

            Variant v = new Variant();

            v["roleId"]         = cid;
            v["roleName"]       = name;
            v["roleLevel"]      = getlv(zhuan, lvl);
            v["roleGold"]       = 0;
            v["roleYb"]         = 0;
            v["roleCreateTime"] = NetClient.instance.CurServerTimeStamp;
            //v["roleleveluptime"] = NetClient.instance.CurServerTimeStamp;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = 0;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = "";
            v["rolePower"]         = 0;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = professionId;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";
            v["gpuid"]             = Globle.YR_srvlists__platuid;
            v["roleEnterTime"]     = Globle.YR_role_enter_time;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]createRole:" + serverInfoJsonString);
        }
Ejemplo n.º 13
0
        public void Cmd_CallBack(Variant v)
        {
            debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!");
            InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING);
            IOSPlatformSDK.m_bInCalling = false;
            int num = v["result"];

            debug.Log(num.ToString());
            bool flag = num < 3;

            if (flag)
            {
                this._inited = num;
            }
            else
            {
                bool flag2 = num == 11 || num == 12 || num == 13;
                if (flag2)
                {
                    bool flag3 = IOSPlatformSDK.m_bLogined && num == 11;
                    if (flag3)
                    {
                        IOSPlatformSDK.m_nResetAppCount = 1;
                    }
                    else
                    {
                        IOSPlatformSDK.LOGIN_ACTION(v);
                    }
                }
                else
                {
                    bool flag4 = num == 42;
                    if (flag4)
                    {
                        GameSdkMgr.record_quit();
                        AnyPlotformSDK.Call_Cmd("close", null, null, true);
                    }
                    else
                    {
                        bool flag5 = num == 21;
                        if (flag5)
                        {
                            GameSdkMgr.record_quit();
                            IOSPlatformSDK.m_nResetAppCount = 1;
                        }
                    }
                }
            }
        }
Ejemplo n.º 14
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);
        }
Ejemplo n.º 15
0
        public void FrameMove()
        {
            bool flag = IOSPlatformSDK.m_nResetAppCount > 0;

            if (flag)
            {
                IOSPlatformSDK.m_nResetAppCount--;
                bool flag2 = IOSPlatformSDK.m_nResetAppCount == 0;
                if (flag2)
                {
                    Debug.Log("重启游戏APP");
                    AnyPlotformSDK.Call_Cmd("resetapp", null, null, true);
                }
            }
        }
Ejemplo n.º 16
0
        public override void init()
        {
            base.getGameObjectByPath("login").SetActive(true);
            base.getGameObjectByPath("loading").SetActive(true);
            login.instance = this;
            this.txtServer = base.getComponentByPath <Text>("login/server/Text");
            this.bt        = base.getComponentByPath <Button>("login/bt");
            this.btChoose  = base.getComponentByPath <Button>("login/server");
            this.waitTxt   = base.getComponentByPath <Text>("loading/txt_wait");
            this.waitTxt.gameObject.SetActive(false);
            this.imageBg = base.getComponentByPath <Image>("mask");
            this.imageBg.gameObject.SetActive(false);
            this.goUpdate    = base.getGameObjectByPath("update");
            this.updateline  = this.goUpdate.transform.FindChild("line");
            this.updatTxt    = this.goUpdate.transform.FindChild("Text").GetComponent <Text>();
            this.uidTxt      = base.getComponentByPath <Text>("login/uid/txt");
            this.noticePanel = base.getGameObjectByPath("notice");
            this.noticeTxt   = this.noticePanel.transform.FindChild("str").GetComponent <Text>();
            this.titleTxt    = this.noticePanel.transform.FindChild("title").GetComponent <Text>();
            this.btn_look    = base.getGameObjectByPath("btn_look");
            this.btn_look.GetComponent <Button>().onClick.AddListener(new UnityAction(this.onOpenNotice));
            this.noticePanel.transform.FindChild("close").GetComponent <Button>().onClick.AddListener(new UnityAction(this.onCloseNotice));
            GameObject gameObjectByPath = base.getGameObjectByPath("msg");

            gameObjectByPath.SetActive(false);
            this.msg = new LoginMsgBox(gameObjectByPath.transform);
            this.bt.onClick.AddListener(new UnityAction(this.onEnterClick));
            this.btChoose.onClick.AddListener(new UnityAction(this.onChoose));
            this.loadingserver   = base.getGameObjectByPath("loading_update");
            this.bt.interactable = (this.btChoose.interactable = false);
            this.goUpdate.SetActive(false);
            GlobleSetting.initSystemSetting();
            base.getGameObjectByPath("fg").SetActive(false);
            this.initScence();
            bool flag = Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_LINKSDK;

            if (flag)
            {
                AndroidPlotformSDK.LOGIN_ACTION = new Action <Variant>(this.platform_Login);
                IOSPlatformSDK.LOGIN_ACTION     = new Action <Variant>(this.platform_Login);
                AnyPlotformSDK.Call_Cmd("login", null, null, true);
            }
            else
            {
                this.changeState(-1, 0);
            }
        }
Ejemplo n.º 17
0
        public override void Pay(rechargeData data)
        {
            // "{\"serverId\":\"300001\",\"serverName\":\"双线1区\",\"serverDesc\":\"s1\",
            // \"roleId\":\"1\",\"roleName\":\"haha\",\"productId\":\"1\",\"productName\":\"asdf\",
            // \"productPrice\":\"1\",\"productCount\":\"1\",\"productDesc\":\"description\",\"change_rate\":\"0\",\"productyb\":\"10\"}";

            debug.Log("begin-pay");
            Variant v = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            v["gpuid"]          = Globle.YR_srvlists__platuid;
            v["serverId"]       = Globle.curServerD.sid;
            v["serverIds"]      = Globle.curServerD.sids;
            v["serverName"]     = Globle.curServerD.server_name;
            v["serverDesc"]     = Globle.curServerD.sid;
            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["productId"]      = data.payid;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);

            if (Application.platform == RuntimePlatform.Android)
            {
                v["productShopId"] = data.pay_android_id;
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                v["productShopId"] = data.pay_ios_id;
            }

            debug.Log("rechargeData:" + RechargeModel.getInstance().getRechargeDataById(data.id));

            debug.Log("name:" + data.name);
            v["productName"]  = data.name;
            v["productPrice"] = data.golden;
            v["productCount"] = 1;
            v["productDesc"]  = data.desc1;
            v["change_rate"]  = 0;
            v["productyb"]    = data.golden_value;

            debug.Log("end-pay");

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", LanPayInfoJsonString);
        }
Ejemplo n.º 18
0
        public override void record_createRole(Variant data)
        {
            int    cid  = data["cid"];
            string name = data["name"];

            if (name.Length > 2)
            {
                name = name.Remove(name.Length - 2);
            }

            uint zhuan        = data["zhua"];
            uint lvl          = data["lvl"];
            int  professionId = data["carr"];

            Variant v = new Variant();

            v["roleId"]         = cid;
            v["roleName"]       = name;
            v["roleLevel"]      = getlv(zhuan, lvl);
            v["roleGold"]       = 0;
            v["roleYb"]         = 0;
            v["roleCreateTime"] = NetClient.instance.CurServerTimeStamp;
            //v["roleleveluptime"] = NetClient.instance.CurServerTimeStamp;
            v["roleServerId"]        = Globle.curServerD.sid;
            v["roleServerName"]      = Globle.curServerD.server_name;
            v["rolevip"]             = 0;
            v["roleLevelUpTime"]     = NetClient.instance.CurServerTimeStamp;
            v["rolePartyName"]       = "";
            v["rolePartyId"]         = "";
            v["rolePower"]           = 0;
            v["rolePartyRoleId"]     = "";
            v["rolePartyRoleName"]   = "";
            v["roleProfessionId"]    = professionId;
            v["roleProfession"]      = "";
            v["roleFriendlist"]      = "";
            v["rolePartyMasterID"]   = "";
            v["rolePartyMasterName"] = "";
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]createRole:" + serverInfoJsonString);
        }
Ejemplo n.º 19
0
        public virtual void record_selectionSever()
        {
            if (Globle.Lan != "zh_cn")
            {
                return;
            }

            Variant v = new Variant();

            v["serverId"]  = Globle.curServerD.sid;
            v["serverIds"] = Globle.curServerD.sids;


            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("selectServer", "lanServer", serverInfoJsonString, false);

            debug.Log("[record]selectionSever:" + serverInfoJsonString);
        }
Ejemplo n.º 20
0
        public void Cmd_CallBack(Variant v)
        {
            debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!");

            //InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING);
            m_bInCalling = false;


            int result = v["result"];

            debug.Log(result.ToString());

            if (result < 3)
            {
                _inited = result;
            }
            else if (result == 11 || result == 12 || result == 13)//登录游戏
            {
                if (m_bLogined && result == 11)
                {
                    //切换账号
                    m_nResetAppCount = 1;
                }
                else
                {
                    LOGIN_ACTION(v);
                }
            }
            else if (result == 42)//退出游戏
            {
                GameSdkMgr.record_quit();
                AnyPlotformSDK.Call_Cmd("close");
                // Application.Quit();
            }
            else if (result == 21)//登出
            {
                GameSdkMgr.record_quit();

                m_nResetAppCount = 1;
                //Application.Quit();
            }
        }
Ejemplo n.º 21
0
        public override void record_login()
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",\"roleYb\":\"200\",
            // \"roleServerId\":\"1\",\"roleServerName\":\"servername\",\"rolevip\":\"1\",\"rolePartyName\":\"哈利噶多\",
            // \"rolePartyId\":\"123\",\"rolePower\":\"1234\",\"rolePartyRoleId\":\"1231\",\"rolePartyRoleName\":\"哈利波特\",
            //\"roleProfessionId\":\"12\",\"roleProfession\":\"无敌法师\",\"roleFriendlist\":\" \"}";

            Globle.YR_role_enter_time = Globle.getStrTimeNomal(NetClient.instance.CurServerTimeStamp);


            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = PlayerModel.getInstance().vip;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = PlayerModel.getInstance().clanid;
            v["rolePower"]         = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = PlayerModel.getInstance().profession;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";
            v["gpuid"]             = Globle.YR_srvlists__platuid;
            v["roleEnterTime"]     = Globle.YR_role_enter_time;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("enterGame", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]login:" + serverInfoJsonString);
        }
Ejemplo n.º 22
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;
        }
Ejemplo n.º 23
0
        public override void record_createRole(Variant data)
        {
            int    val  = data["cid"];
            string text = data["name"];
            bool   flag = text.Length > 2;

            if (flag)
            {
                text = text.Remove(text.Length - 2);
            }
            uint    up_lv   = data["zhua"];
            uint    lv      = data["lvl"];
            int     val2    = data["carr"];
            Variant variant = new Variant();

            variant["roleId"]            = val;
            variant["roleName"]          = text;
            variant["roleLevel"]         = this.getlv(up_lv, lv);
            variant["roleGold"]          = 0;
            variant["roleYb"]            = 0;
            variant["roleCreateTime"]    = NetClient.instance.CurServerTimeStamp;
            variant["roleServerId"]      = Globle.curServerD.sid;
            variant["roleServerName"]    = Globle.curServerD.server_name;
            variant["rolevip"]           = 0;
            variant["rolePartyName"]     = "";
            variant["rolePartyId"]       = "";
            variant["rolePower"]         = 0;
            variant["rolePartyRoleId"]   = "";
            variant["rolePartyRoleName"] = "";
            variant["roleProfessionId"]  = val2;
            variant["roleProfession"]    = "";
            variant["roleFriendlist"]    = "";
            string text2 = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", text2, false);
            debug.Log("[record]createRole:" + text2);
        }
Ejemplo n.º 24
0
 public virtual void clearVoices()
 {
     AnyPlotformSDK.Call_Cmd("deleteAllVoice", null, null, false);
 }
Ejemplo n.º 25
0
 private void quitGameHandle()
 {
     AnyPlotformSDK.Call_Cmd("close", null, null, true);
 }
Ejemplo n.º 26
0
        public override void init()
        {
            getGameObjectByPath("login").SetActive(true);
            getGameObjectByPath("loading").SetActive(true);


            instance       = this;
            txtServer      = getComponentByPath <Text>("login/server/Text");
            txtServer.text = "";
            bt             = getComponentByPath <Button>("login/bt");
            btChoose       = getComponentByPath <Button>("login/server");

            waitTxt = getComponentByPath <Text>("loading/txt_wait");
            waitTxt.gameObject.SetActive(false);

            imageBg = this.getComponentByPath <Image>("mask");
            imageBg.gameObject.SetActive(false);
            goUpdate   = getGameObjectByPath("update");
            updateline = goUpdate.transform.FindChild("line");
            updatTxt   = goUpdate.transform.FindChild("Text").GetComponent <Text>();
            uidTxt     = getComponentByPath <Text>("login/uid/txt");
            vetTxt     = getComponentByPath <Text>("login/ver_txt");

            noticePanel = getGameObjectByPath("notice");
            noticeTxt   = noticePanel.transform.FindChild("scroll_view/str").GetComponent <Text>();
            //titleTxt = noticePanel.transform.FindChild("title").GetComponent<Text>();
            //titleTxt = noticePanel.transform.FindChild("title").gameObject;
            btn_look = getGameObjectByPath("btn_look");
            btn_look.GetComponent <Button>().onClick.AddListener(onOpenNotice);
            noticePanel.transform.FindChild("close").GetComponent <Button>().onClick.AddListener(onCloseNotice);

            GameObject go = getGameObjectByPath("msg");

            go.SetActive(false);
            msg = new LoginMsgBox(go.transform);

            bt.onClick.AddListener(onEnterClick);
            btChoose.onClick.AddListener(onChoose);

            loadingserver = getGameObjectByPath("loading_update");

            bt.interactable = btChoose.interactable = false;
            goUpdate.SetActive(false);
            GlobleSetting.initSystemSetting();

            getGameObjectByPath("fg").SetActive(false);

            initScence();

            if (Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_LINKSDK)
            {
                AndroidPlotformSDK.LOGIN_ACTION = platform_Login;
                IOSPlatformSDK.LOGIN_ACTION     = platform_Login;
                AnyPlotformSDK.Call_Cmd("login");


                ////内网链接测试
                //Globle.YR_srvlists__slurl = "http://10.1.8.76/ifacec/sdk_srvlists.php?";
                //Globle.YR_srvlists__platform = "lanandroid";
                //Globle.YR_srvlists__sign = "123";
                //Globle.YR_srvlists__platuid = "171039691";
                //LGPlatInfo.inst.loadServerList();
            }
            else
            {
                changeState(-1);
            }
        }
Ejemplo n.º 27
0
 public virtual void showbalance()
 {
     AnyPlotformSDK.Call_Cmd("showbalance", null, null, false);
 }
Ejemplo n.º 28
0
        private void Update()
        {
            bool flag = this.m_nSDK_ReloginCount > 0;

            if (flag)
            {
                this.m_nSDK_ReloginCount--;
                bool flag2 = this.m_nSDK_ReloginCount == 0;
                if (flag2)
                {
                    AnyPlotformSDK.Call_Cmd("login", null, null, true);
                }
            }
            bool flag3 = this.goUpdate.active && this.curlineScale < 1f;

            if (flag3)
            {
                bool flag4 = this.curlineScale < this.toLineScale;
                if (flag4)
                {
                    this.curlineScale += 0.01f;
                    bool flag5 = this.curlineScale > 0.95f;
                    if (flag5)
                    {
                        this.curlineScale = 1f;
                    }
                    this.updateline.localScale = new Vector3(this.curlineScale, 1f, 1f);
                    bool flag6 = this.curlineScale == 1f;
                    if (flag6)
                    {
                        bool flag7 = this.canEnter;
                        if (flag7)
                        {
                            this.changeState(0, 0);
                        }
                        else
                        {
                            this.canEnter = true;
                        }
                    }
                }
            }
            bool flag8 = this.curState == 0;

            if (!flag8)
            {
                bool flag9 = this.curState == 1;
                if (flag9)
                {
                    this.curState = 2;
                }
                else
                {
                    bool flag10 = this.curState == 2;
                    if (flag10)
                    {
                        this.aniCam.Play("cam_move");
                        this.imageBg.gameObject.SetActive(true);
                        this.maskColor.a   = 0f;
                        this.imageBg.color = this.maskColor;
                        this.curState      = 3;
                    }
                    else
                    {
                        bool flag11 = this.curState == 3;
                        if (flag11)
                        {
                            float normalizedTime = this.aniCam["cam_move"].normalizedTime;
                            bool  flag12         = normalizedTime >= 1f;
                            if (flag12)
                            {
                                bool flag13 = this._overhandle != null;
                                if (flag13)
                                {
                                    this._overhandle();
                                }
                                this._overhandle = null;
                                this.curState    = 4;
                                this.maskColor.a = 1f;
                                bool flag14 = this.scene != null;
                                if (flag14)
                                {
                                    UnityEngine.Object.Destroy(this.scene);
                                }
                                this.scene = null;
                                bool flag15 = GRMap.instance != null;
                                if (flag15)
                                {
                                    GRMap.instance.refreshLightMap();
                                    (UIClient.instance.getLGUI("LGUIMainUIImpl") as LGIUIMainUI).show_all();
                                }
                            }
                            else
                            {
                                this.maskColor.a   = normalizedTime;
                                this.imageBg.color = this.maskColor;
                            }
                        }
                        else
                        {
                            bool flag16 = this.curState == 4;
                            if (flag16)
                            {
                                bool flag17 = this.maskColor.a <= 0.1f;
                                if (flag17)
                                {
                                    this.curState = 5;
                                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                                    InterfaceMgr.getInstance().destory(InterfaceMgr.SERVE_CHOOSE);
                                    InterfaceMgr.getInstance().destory(InterfaceMgr.LOGIN);
                                }
                                else
                                {
                                    this.maskColor.a   = this.maskColor.a - 0.05f;
                                    this.imageBg.color = this.maskColor;
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 29
0
        private int m_nSDK_ReloginCount = 0; //因为不知的原因,平台登入取消了,或者是登入错误了,需要重新打开登入界面
        void Update()
        {
            if (m_nSDK_ReloginCount > 0)
            {
                debug.Log("平台的登入取消 " + m_nSDK_ReloginCount);
                m_nSDK_ReloginCount--;

                if (m_nSDK_ReloginCount == 0)
                {
                    debug.Log("平台的登入 " + m_nSDK_ReloginCount);
                    AnyPlotformSDK.Call_Cmd("login");
                }
            }

            if (goUpdate.active == true && curlineScale < 1f)
            {
                if (curlineScale < toLineScale)
                {
                    curlineScale += 0.01f;
                    if (curlineScale > 0.95f)
                    {
                        curlineScale = 1f;
                    }

                    updateline.localScale = new Vector3(curlineScale, 1, 1);

                    if (curlineScale == 1f)
                    {
                        if (canEnter)
                        {
                            changeState(0);
                        }
                        else
                        {
                            canEnter = true;
                        }
                    }
                }
            }

            if (curState == 0)
            {
                return;
            }

            if (curState == 1)
            {
                curState = 2;
            }
            else if (curState == 2)
            {
                aniCam.Play("cam_move");
                imageBg.gameObject.SetActive(true);
                maskColor.a   = 0f;
                imageBg.color = maskColor;
                curState      = 3;
            }
            else if (curState == 3)
            {
                float anilen = aniCam["cam_move"].normalizedTime;
                //  aniCam.
                if (anilen >= 1f)
                {
                    if (_overhandle != null)
                    {
                        _overhandle();
                    }
                    _overhandle = null;
                    curState    = 4;
                    maskColor.a = 1;
                    if (scene != null)
                    {
                        Destroy(scene);
                    }
                    scene = null;
                    if (GRMap.instance != null)
                    {
                        GRMap.instance.refreshLightMap();
                        LGUIMainUIImpl_NEED_REMOVE.getInstance().show_all();
                    }
                }
                else
                {
                    maskColor.a   = anilen;
                    imageBg.color = maskColor;
                }
            }
            else if (curState == 4)
            {
                if (maskColor.a <= 0.1f)
                {
                    curState = 5;
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.ui_Camera_cam.gameObject.SetActive(true);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.SERVE_CHOOSE);
                    InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.LOGIN);
                }
                else
                {
                    maskColor.a  -= 0.05f;
                    imageBg.color = maskColor;
                }
            }
        }
Ejemplo n.º 30
0
        public void Cmd_CallBack(Variant v)
        {
            //发送的请求返回了 这里现只处理充值

            debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!" + v.dump());
            int result = v["result"];

            //if (result != 85)
            //    InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING);
            m_bInCalling = false;


            if (result == 11 || result == 12 || result == 13)//登录游戏
            {
                if (m_bLogined && result == 11)
                {
                    //切换账号
                    m_nResetAppCount = 1;
                }
                else
                {
                    LOGIN_ACTION(v);
                }
            }
            else if (result == 43)//退出游戏
            {
                GameSdkMgr.record_quit();
                //AnyPlotformSDK.Call_Cmd("close");
                // Application.Quit();
            }
            else if (result == 21)//登出
            {
                debug.Log("登出回调!!!!!");

                AnyPlotformSDK.Call_Cmd("resetapp");
                //GameSdkMgr.record_quit();
                //AnyPlotformSDK.Call_Cmd("loginout");
                m_nResetAppCount = 1;
                //Application.Quit();
            }
            else if (result == 61) //切换
            {
                //AnyPlotformSDK.Call_Cmd("switchAccount");
            }
            else if (result == 81)//开始录音
            {
                Variant data = v["data"];

                GameSdkMgr.m_sdk.voiceRecordHanlde("begin", "", 0);
            }
            else if (result == 82)//开始录音失败
            {
                Variant data = v["data"];
                if (data.ContainsKey("error"))
                {
                    GameSdkMgr.m_sdk.voiceRecordHanlde("error", data["error"], 0);
                    return;
                }
            }
            else if (result == 83)//结束录音
            {
                Variant data = v["data"];

                GameSdkMgr.m_sdk.voiceRecordHanlde("end", data["url"], data["seconds"]);
            }
            else if (result == 84)//结束录音失败
            {
                Variant data = v["data"];
                if (data.ContainsKey("error"))
                {
                    GameSdkMgr.m_sdk.voiceRecordHanlde("error", data["error"], 0);
                    return;
                }
            }
            else if (result == 91)//播放语音失败
            {
                GameSdkMgr.m_sdk.voicePlayedHanlde("error");
            }
            else if (result == 92)//播放结束
            {
                // if (GameSdkMgr.playedHanlde != null)
                GameSdkMgr.m_sdk.voicePlayedHanlde("played");
            }
        }