/// <summary> /// 反馈信息接口 /// </summary> /// <param name="data">用户反馈的数据</param> public void PostFeedback(int type, string msg, System.Action <bool> callback = null) { GlobalConfig globalConfig = GlobalConfig.GetInstance(); GlobalConfig.LoginInfoStruct loginInfo = globalConfig.LoginInfo; IBridge bridge = DBOSManager.getOSBridge(); string url = GlobalConfig.GetInstance().CSURLV + "Feedback"; url += "?account=" + loginInfo.AccName; url += "&game_mark=" + globalConfig.GameMark; url += "&ticket=" + WWW.EscapeURL(loginInfo.Ticket); url += "&device_mark=dm" + globalConfig.DeviceMark; url += "&provider=" + globalConfig.SDKName; url += "&server_id=" + loginInfo.ServerInfo.ServerId; url += "&role_id=" + loginInfo.RId; url += "&role_name=" + WWW.EscapeURL(LocalPlayerManager.Instance.LocalActorAttribute.Name, System.Text.Encoding.UTF8); url += "&lv=" + LocalPlayerManager.Instance.LocalActorAttribute.Level; url += "&type=" + type; url += "&title=" + WWW.EscapeURL(xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_18"), System.Text.Encoding.UTF8); url += "&msg=" + WWW.EscapeURL(msg, System.Text.Encoding.UTF8); //url = System.Uri.EscapeUriString(url); mPostFeedbackCallback = callback; MainGame.HttpRequest.GET(url, OnFeedback, null); }
/// <summary> /// 账号登陆日志记录(已经选服登陆请求) /// </summary> /// <param name="serverId">Server identifier.</param> /// <param name="serverType">Server type.</param> public void PostAccountLoginLogS(int serverId, EServerState serverType) { GlobalConfig globalConfig = GlobalConfig.GetInstance(); GlobalConfig.LoginInfoStruct loginInfo = globalConfig.LoginInfo; IBridge bridge = DBOSManager.getOSBridge(); string url = GlobalConfig.GetInstance().LogURLV + "AccountLoginLogS?account=" + loginInfo.AccName; url += "&server_id=" + serverId; url += "&server_type=" + (int)serverType; url += "&show_marked=" + globalConfig.ServerType; url += "&provider=" + globalConfig.SDKName; url += "&device_mark=" + globalConfig.DeviceMark; url += "&os=" + globalConfig.PlatformName; url += "&os_ver=" + bridge.getOSVersion(); url += "&mobile=" + bridge.getPhoneModel(); url += "&net=" + bridge.getNetType(); url += "&imei=" + bridge.getPhoneIMEI(); url += "&mac=" + bridge.getPhoneMAC(); url += "&imsi=" + bridge.getPhoneIMSI(); url += "&game_mark=" + globalConfig.GameMark; url += "&sub_chn=" + globalConfig.SubChannel; MainGame.HttpRequest.GET(url, null, null); }
//-------------------------------------------------------- // 外部调用 //-------------------------------------------------------- //-------------------------------------------------------- // 控件消息 //-------------------------------------------------------- /// <summary> /// 点击登录/切换账号按钮 /// </summary> public void OnClickSDKAccountButton() { if (mInDelayTime) { return; } SetSDKButtonText(xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_100")); GlobalConfig globalConfig = GlobalConfig.GetInstance(); if (globalConfig.IsEnterSDK) { // sdk不在初始化、登陆状态下 if (!IsSDKWorking()) { if (string.IsNullOrEmpty(globalConfig.LoginInfo.AccName) == true) { SDKControler.getSDKControler().loginSDK(OnLoginCallback); } else { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.setLoginMsg(""); bridge.logout(); SetSelectedServerInfo(null); SDKControler.getSDKControler().loginSDK(OnLoginCallback); } } } else { GameDebug.LogError("UIQucikWindow must be in sdk"); } }
public void PostDeviceInit(System.Action <bool> callback = null) { ControlServerLogHelper.Instance.PostPlayerFollowRecord(PlayerFollowRecordSceneId.DeviceInitStart, "", false); GlobalConfig globalConfig = GlobalConfig.GetInstance(); IBridge bridge = DBOSManager.getDBOSManager().getBridge(); string url = GlobalConfig.GetInstance().CSURLV + "DeviceInit"; url += "?os=" + globalConfig.PlatformName; url += "&os_ver=" + bridge.getOSVersion(); url += "&imei=" + bridge.GetPhoneIDFA(); url += "&mac=" + bridge.getPhoneMAC(); url += "&imsi=" + bridge.getPhoneIMSI(); url += "&brand="; url += "&mobile=" + bridge.getPhoneModel(); url += "&app_ver=" + bridge.getAppVersion(); url += "&cpu_t=" + bridge.getCPUAPI(); url += "&net=" + bridge.getNetType(); url += "&device_mark=" + globalConfig.DeviceMark; url += "&provider=" + globalConfig.SDKName; url += "&device_id="; url += "&game_mark=" + globalConfig.GameMark; url += "&ram=" + bridge.getAvailMemory(); url += "&rom=" + bridge.getStorageFreeSize(); mPostDeviceInitFinishedCallback = callback; Debug.Log(string.Format("[PostDeviceInit] {0}", url)); HttpRequest.Instance.GET(url, OnPostDeviceInitFinished, null); }
public static void DoFacebookShare(string value) { if (Const.Region != RegionType.KOREA || string.IsNullOrEmpty(value)) { return; } var bridge = DBOSManager.getDBOSManager().getBridge(); Hashtable extmap = new Hashtable(); GlobalConfig globalConfig = GlobalConfig.GetInstance(); extmap.Add("roleID", globalConfig.LoginInfo.RId); extmap.Add("roleName", globalConfig.LoginInfo.Name); extmap.Add("serverID", globalConfig.LoginInfo.ServerInfo.ServerId); extmap.Add("shareEvent", "forevershare"); extmap.Add("shareDetail", value); extmap.Add("screenShotFile", ""); Hashtable parameter = new Hashtable(); parameter.Add("action", "doFacebookShare"); parameter.Add("extmap", extmap); Hashtable hashtable = new Hashtable(); hashtable.Add("action", "sdkInvoke"); hashtable.Add("parameter", parameter); string str = MiniJSON.JsonEncode(hashtable); bridge.doAction2SDK(str); //GameDebug.LogError(str); }
public override void Update() { float now = Time.time; if (Game.GetInstance().IsSwitchingScene || !SceneHelp.Instance.IsPlayingInstance) { mFPS = 0; mFrameCount = 0; mLastTime = now; return; } mFrameCount++; if (now >= mLastTime + FPSUpdateWaitTime) { float fps = mFrameCount / (now - mLastTime); mFPS = (int)fps; mFrameCount = 0; mLastTime = now; // TestinExternalLog var logContent = string.Format(mLogFmt, mLogCount, mFPS); DBOSManager.getOSBridge().log2OSCmd("TestinExternalLog", logContent); mLogCount += 1; OnFPSUpdate(); } }
/// <summary> /// 根据传入的IPV4地址获取模拟的IPV6地址 /// </summary> /// <param name="serverIp"></param> /// <param name="newServerIp"></param> /// <param name="ipType"></param> void GetIPType(String serverIp, out String newServerIp, out AddressFamily ipType) { ipType = AddressFamily.InterNetwork; newServerIp = serverIp; try { string mIPv6 = DBOSManager.getOSBridge().getIPv6(serverIp); if (!string.IsNullOrEmpty(mIPv6)) { string[] tmpStr = System.Text.RegularExpressions.Regex.Split(mIPv6, "&&"); if (tmpStr != null && tmpStr.Length >= 2) { string ipTypeStr = tmpStr[1]; if (ipTypeStr == "ipv6") { newServerIp = tmpStr[0]; ipType = AddressFamily.InterNetworkV6; } } } } catch (Exception e) { GameDebug.LogError("GetIPv6 error:" + e); } }
/* * 发送消息给SDK,SDK会把这些参数发送给有角色采集需求的SDK * * dataType int 调用时机, 1、选择服务器。2、创建角色。3、进入游戏。4、等级提升。5退出游戏 * serverID String 玩家所在服务器的ID * serverName String 玩家所在的服务器名称 * roleID String 玩家角色ID * roleType String 玩家角色类型 * roleName String 玩家角色名字 * roleLevel String 玩家角色等级 * moneyNum String 当前角色身上拥有的游戏币 * roleCreateTime Long 角色创建时间 * roleLevelUpTime Long 角色等级变化 * Vip String 玩家VIP等级 * */ public void sendRoleInfo2SDK(int dataType, string serverID, string serviceName, string roleId, string roleType, string roleName, string roleLevel, string moneyNum, string roleCreateTime, string roleLevelUpTime, string vip, string accName) { if (GlobalConfig.Instance.IsDisableDoAction2SDK == true) { return; } Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("dataType", dataType.ToString());//1.选择服务器2.创建角色3.进入游戏4.等级提升5.退出游戏 parameters.Add("serverID", serverID); parameters.Add("serviceName", serviceName); parameters.Add("moneyNum", moneyNum);//金币数量 parameters.Add("roleCreateTime", roleCreateTime); parameters.Add("service", serviceName); parameters.Add("roleId", roleId); parameters.Add("roleType", roleType); parameters.Add("roleName", roleName); parameters.Add("roleLevel", roleLevel); parameters.Add("roleLevelUpTime", roleLevelUpTime); parameters.Add("vip", vip); parameters.Add("accName", accName); Dictionary <string, string> all = new Dictionary <string, string>(); all.Add("action", "roleInfo"); all.Add("parameter", MiniJSON.JsonEncode(new Hashtable(parameters))); Hashtable hashtable = new Hashtable(all); string str = MiniJSON.JsonEncode(hashtable); IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.doAction2SDK(str); }
public bool CheckReply(string url, string error, System.Object replyObject) { if (string.IsNullOrEmpty(error) == false) { GameDebug.LogError("Control server error: " + error); xc.ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(DBConstText.GetText("GET_SERVER_INFO_FAIL")); return(false); } Hashtable hashtable = replyObject as Hashtable; if (hashtable != null) { System.Object resultObject = hashtable["result"]; if (resultObject != null) { int result = System.Convert.ToInt32(resultObject); if (result == 1) { return(true); } else if (result == 2)//result=2代表ticket过期 { //登出游戏 IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.logout(); return(false); } } } return(false); }
// 响应退出按钮点击 public void OnClickExit() { if (Const.Region == RegionType.CHINA) { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.logout(); } else { if (Const.Region == RegionType.KOREA) { ClientEventMgr.GetInstance().FireEvent((int)ClientEvent.CE_SERVERLIST_TO_CREATEACTOR_END, new CEventBaseArgs()); } Close(); GlobalConfig globalConfig = GlobalConfig.GetInstance(); if (globalConfig.IsEnterSDK) { UIManager.Instance.ShowWindow("UIQuickLoginWindow", true); } else { if (Game.Instance.IsSkillEditorScene == false) { UIManager.Instance.ShowWindow("UILoginWindow"); } } } }
private void OnClickUserButton() { if (SDKControler.getSDKControler().IsLoginSuccess) { DBOSManager.getDBOSManager().getBridge().userCenter(); } }
public void OnLog(string log, string stackTrace, LogType type) { // 暂时屏蔽崩溃堆栈消息的发送 if (type == LogType.Exception) { string text = string.Format("{0}\r\n------Call Stack:------\r\n{1}------------\r\n", log, stackTrace); #if UNITY_EDITOR UINotice.GetInstance().ShowMessage("Program abnormal"); #endif if (LogPosted == false)//&& !Application.isEditor)// 在编辑器中不发送错误日志 { DBOSManager.writeCSDmpToFile(text); LogPosted = true; #if UNITY_EDITOR // 游戏报错的时候要关闭数据库,不然退出游戏的时候退出不了 DBManager.Instance.CloseAllSqliteDB(); #endif } } var debugUI = MainGame.DebugUI; if (debugUI != null) { debugUI.OnLog(log, stackTrace, type); } }
public static void ReportTjPlacementEvnet(string value, string category = "") { if (Const.Region != RegionType.KOREA || string.IsNullOrEmpty(value)) { return; } var bridge = DBOSManager.getDBOSManager().getBridge(); Hashtable extmap = new Hashtable(); extmap.Add("event", value); extmap.Add("category", category); Hashtable parameter = new Hashtable(); parameter.Add("action", "tj_placement"); parameter.Add("extmap", extmap); Hashtable hashtable = new Hashtable(); hashtable.Add("action", "reportEvent"); hashtable.Add("parameter", parameter); string str = MiniJSON.JsonEncode(hashtable); bridge.doAction2SDK(str); //GameDebug.LogError(str); }
public static void ReportEsaAppsflyerEvnet(string eventName, string argKey, int argValue) { if (Const.Region != RegionType.SEASIA) { return; } var bridge = DBOSManager.getDBOSManager().getBridge(); Hashtable extmap = new Hashtable(); extmap.Add(argKey, argValue); Hashtable parameter = new Hashtable(); parameter.Add("action", eventName); parameter.Add("extmap", extmap); Hashtable hashtable = new Hashtable(); hashtable.Add("action", "reportEvent"); hashtable.Add("parameter", parameter); string str = MiniJSON.JsonEncode(hashtable); bridge.doAction2SDK(str); //GameDebug.LogError(string.Format("ReportEsaAppsflyerEvnet ==> {0}", str)); }
public static void GoogleSubmitAchievements(string value) { if (Const.Region != RegionType.KOREA || string.IsNullOrEmpty(value)) { return; } var bridge = DBOSManager.getDBOSManager().getBridge(); Hashtable extmap = new Hashtable(); extmap.Add("achievementsId", value); Hashtable parameter = new Hashtable(); parameter.Add("action", "GoogleSubmitAchievements"); parameter.Add("extmap", extmap); Hashtable hashtable = new Hashtable(); hashtable.Add("action", "sdkInvoke"); hashtable.Add("parameter", parameter); string str = MiniJSON.JsonEncode(hashtable); bridge.doAction2SDK(str); //GameDebug.LogError(str); }
public bool Init(string filename) { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); string targetPath = bridge.getGameResPath(); filePath = targetPath + filename + ".json"; instanceMap[filePath] = this; if (File.Exists(filePath)) { string str = File.ReadAllText(filePath); Hashtable table = MiniJSON.JsonDecode(str) as Hashtable; if (table != null) { playerPrefsMap[filePath] = table; return(true); } else { playerPrefsMap[filePath] = new Hashtable(); GameDebug.LogError("Get PlayerPrefs error!!! filePath: " + filePath); } } else { playerPrefsMap[filePath] = new Hashtable(); //GameDebug.LogError("Get PlayerPrefs error, file not exists!!! filePath: " + filePath); return(true); } return(false); }
public void OnNetDisconnect(NetType netType, int e) { if (netType == NetType.NT_UDP) { return; } Debug.Log("Disconnect to server! Error:" + e.ToString()); // 如果开启了跨服,关闭跨服Socket if (Net.NetClient.CrossToggle) { CrossServerIntegration.GetInstance().Stop(); } // 关闭主Socket StopNetClient(); string notice = ""; if (mQueueMax) // 排队中 { notice = xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_33"); ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, notice, OnClickRetryBtn, null); } else if (mLoginConflict) { ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, mLoginConflictNotice, x => { mLoginConflict = false; IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.logout(); }, null, "UINotice2Window"); } else if (mMaintainServer)// 维护服务器中 { ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, mMaintainServerNotice, x => { mMaintainServer = false; IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.logout(); }, null, "UINotice2Window"); } else if (!IsEnterGame)// 还未进入游戏 { ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_34"), x => { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.logout(); }, null, "UINotice2Window"); } ClientEventMgr.Instance.FireEvent((int)ClientEvent.CE_NET_MAIN_DISCONNECT, null); }
public static DBOSManager getDBOSManager() { if (osManager == null) { osManager = new DBOSManager(); } return(osManager); }
//获取更新信息 public string getUpdateCheckUrl() { IBridge bridge = DBOSManager.getOSBridge(); string url = string.Format("{0}UpdateCheck?platform={1}&app_v={2}&mobile={3}&lib_v=0.0.0&game_mark={4}&cpu=armeabi-v7a&api_ver=1.0&device_mark={5}&imei={6}&res_v=0&res_v=0", GlobalConfig.GetInstance().CSURLV, "ios_" + bridge.getSDKName(), bridge.getAppVersion(), bridge.getPhoneModel(), GlobalConfig.Instance.GameMark, GlobalConfig.Instance.DeviceMark, bridge.GetPhoneIDFA()); return(url); }
void Start() { mTime = 0; mBatterySlider = GetComponent <Slider>(); if (mBatterySlider != null) { mBatterySlider.value = DBOSManager.getOSBridge().getBattery(); } }
public void loginSDK(OnLoginCallback callback) { this.mLoginCallback = callback; IBridge bridge = DBOSManager.getDBOSManager().getBridge(); //bridge.setLoginMsg(""); bridge.login(); }
void CheckCacheDirectory() { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); path = bridge.getGameResPath() + "/ImageCache/"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } }
public void InitSDK() { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); if (bridge != null) { bridge.initSDK(); mIsIniting = true; } }
/// <summary> /// 云梯事件上报 /// </summary> public void PostCloudLadderEventAction(CloudLadderMarkEnum mark) { if (GlobalConfig.Instance.IsPostCloudLadderAction == false) { return; } FieldInfo fi = mark.GetType().GetField(mark.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); string desc = (attributes.Length > 0) ? attributes[0].Description : ""; var descBytes = Encoding.UTF8.GetBytes(desc); desc = Encoding.UTF8.GetString(descBytes); var loginInfo = GlobalConfig.Instance.LoginInfo; Hashtable parameters = new Hashtable(); parameters.Add("step", ((int)mark).ToString()); //步骤编号 parameters.Add("mark", mark.ToString()); // 步骤标识 parameters.Add("desc", desc); //描述 parameters.Add("gamever", VersionInfoManager.Instance.GameVersion); // 游戏版本 parameters.Add("ram", SystemInfo.systemMemorySize.ToString()); string rid = ""; // 游戏角色id if (null != loginInfo) { rid = loginInfo.RId; } parameters.Add("rid", rid); Hashtable all = new Hashtable(); all.Add("action", "checkpoint"); string uid = ""; // 游戏后台分配的账号id(passport) if (null != loginInfo) { uid = loginInfo.AccName; } all.Add("userId", uid); all.Add("parameter", MiniJSON.JsonEncode(parameters)); string str = MiniJSON.JsonEncode(all); IBridge bridge = DBOSManager.getDBOSManager().getBridge(); bridge.cloudLadderEventWithAction(str); }
static int _g_get_Res2Version(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { DBOSManager __cl_gen_to_be_invoked = (DBOSManager)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.Res2Version); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
// 点击开始,进入游戏 public void OnEnterGame() { if (mSelectIndex < 0) { ui.UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_90")); return; } // 保存本地玩家ID UnitID uid = new UnitID(); uid.type = (byte)EUnitType.UNITTYPE_PLAYER; uid.obj_idx = (uint)mData [mSelectIndex].uuid; Game.GetInstance().LocalPlayerID = uid; Game.GetInstance().LocalPlayerTypeID = ActorHelper.RoleIdToTypeId(mData [mSelectIndex].rid); Game.GetInstance().LocalPlayerName = System.Text.Encoding.UTF8.GetString(mData [mSelectIndex].name); // 保存选择的角色索引 GlobalSettings.GetInstance().LastActorIndex = mSelectIndex; GlobalSettings.GetInstance().Save(); // Enter Game C2SEnterGame c2sEnterGame = new C2SEnterGame(); c2sEnterGame.uuid = mData[mSelectIndex].uuid; NetClient.GetBaseClient().SendData <C2SEnterGame>(NetMsg.MSG_ENTER_GAME, c2sEnterGame); GlobalConfig.GetInstance().LoginInfo.Name = System.Text.Encoding.UTF8.GetString(mData[mSelectIndex].name); GlobalConfig.GetInstance().LoginInfo.RId = mData [mSelectIndex].uuid.ToString(); GlobalConfig.GetInstance().LoginInfo.Job = mData [mSelectIndex].rid.ToString(); GlobalConfig.GetInstance().LoginInfo.Level = mData[mSelectIndex].level.ToString(); ControlServerLogHelper.GetInstance().PostRoleInfo(); // 注册FCM DBOSManager.getOSBridge().registerFCM(); DBOSManager.getOSBridge().registerPush(); // 为确保进入场景的角色等级判断正确,这里要赋值给LocalPlayerManager LocalPlayerManager.Instance.LocalActorAttribute.Level = mData[mSelectIndex].level; Game.Instance.IsCreateRoleEnter = false; xc.ui.ugui.UIManager.Instance.ShowWaitScreen(true); // 点击选角按钮 ControlServerLogHelper.Instance.PostPlayerFollowRecord(PlayerFollowRecordSceneId.ClickSelectActorButton); ControlServerLogHelper.Instance.PostCloudLadderEventAction(CloudLadderMarkEnum.select_role); }
void OnSDKLogined(CEventBaseArgs data) { IBridge bridge = DBOSManager.getDBOSManager().getBridge(); string msg = bridge.getLoginMsg(); if (!string.IsNullOrEmpty(msg)) { // SDK登录 ControlServerLogHelper.Instance.PostPlayerFollowRecord(PlayerFollowRecordSceneId.SDKLogin, "", false); ControlServerLogHelper.Instance.PostCloudLadderEventAction(CloudLadderMarkEnum.login_sdk); GotoCSLogin(msg); } }
// 获取更新信息,加密版 public string getUpdateCheckUrlEx() { IBridge bridge = DBOSManager.getOSBridge(); var fmt = "platform={0}&app_v={1}&mobile={2}&lib_v=0.0.0&game_mark={3}&cpu=armeabi-v7a&api_ver=1.0&device_mark={4}&imei={5}&res_v=0&res_v=0"; string sign = string.Format(fmt, "ios_" + bridge.getSDKName(), bridge.getAppVersion(), bridge.getPhoneModel(), GlobalConfig.Instance.GameMark, GlobalConfig.Instance.DeviceMark, bridge.GetPhoneIDFA()); Debug.Log(string.Format("controlServer_oriSign_ZYGXCheck2 = {0}", sign)); sign = WWW.EscapeURL(Utils.AES.Encode(sign, Const.CS_URL_KEY, Const.CS_URL_IV)); string url = string.Format("{0}ZYGXCheck2?sign={1}", GlobalConfig.GetInstance().CSURLVEX, sign); return(url); }
void Update() { if (null != mBatterySlider) { if (mTime >= mBatteryCD) { mTime = 0; if (mBatterySlider != null) { mBatterySlider.value = DBOSManager.getOSBridge().getBattery(); } } mTime += Time.deltaTime; } }
/// <summary> /// 获取最近登录服务器列表 /// </summary> public void GetLatelyLoginServerInfo(GetLatelyLoginServerListFinishedDelegate finishCallback) { GlobalConfig globalConfig = GlobalConfig.GetInstance(); GlobalConfig.LoginInfoStruct loginInfo = globalConfig.LoginInfo; IBridge bridge = DBOSManager.getOSBridge(); string url = globalConfig.CSURLV + "GetLatelyLoginServerInfo?show_marked=" + globalConfig.ServerType + "&game_mark=" + GlobalConfig.Instance.GameMark + "&account=" + globalConfig.LoginInfo.AccName + "&device_mark=" + globalConfig.DeviceMark; MainGame.HttpRequest.GET(url, OnGetLatelyLoginServerInfoFinished, null); mGetLatelyLoginServerListFinishedCallback = finishCallback; }