public static void ReadGameVersionInfo() { if (Util.HasKey("dhh_version")) { string @string = Util.GetString("dhh_version"); string[] array = @string.Split(new char[] { '|' }); if (array.Length >= 2) { int num = Convert.ToInt32(array[0]); int appVersionCode = PlatformUtil.GetInstance().GetAppVersionCode(); AppConst.GameVerCode = Mathf.Max(num, appVersionCode); if (appVersionCode > num) { AppConst.GameVerName = PlatformUtil.GetInstance().GetAppVersionName(); } else { AppConst.GameVerName = array[1]; } } else { AppConst.GameVerCode = PlatformUtil.GetInstance().GetAppVersionCode(); AppConst.GameVerName = PlatformUtil.GetInstance().GetAppVersionName(); } } else { AppConst.GameVerCode = PlatformUtil.GetInstance().GetAppVersionCode(); AppConst.GameVerName = PlatformUtil.GetInstance().GetAppVersionName(); } }
public override void OnMessage(IMessage message) { string name = message.Name; object body = message.Body; string text = name; switch (text) { case "UpdateTipsContent": this.OnUpdateTipsContent(body.ToString()); break; case "ExtractPackageFile": this.OnExtractPackageFile(body.ToString()); break; case "UpdateDownloadProgress": this.OnDownloadProgress(body.ToString()); break; case "UpdateCompleteEnterGame": if (Convert.ToBoolean(body)) { this.txtVersion.text = string.Format("{0}_{1}_{2}", PlatformUtil.GetInstance().GetChannelId(), AppConst.GameVerName, AppConst.GameVerCode); } break; case "UpdateShowTips": this.OnShowUpdateTips(body); break; } }
public static void OpenWebViewWithLocalFile(string filename, Rect viewRect, Action <bool> completeCallback) { string text = Util.DataPath + filename; if (Application.platform == RuntimePlatform.Android) { text = "file:///" + text; } PlatformUtil.GetInstance().OpenWebView(text, viewRect, completeCallback); }
private static int GetInstance(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 0); PlatformUtil instance = PlatformUtil.GetInstance(); ToLua.PushObject(L, instance); result = 1; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
private void InitView() { Util.ReadGameVersionInfo(); Transform transform = base.transform.FindChild("SliderExtract"); this.sliderExtractProgress = transform.GetComponent <Slider>(); this.txtVersion = base.transform.FindChild("TxtVersion").GetComponent <Text>(); this.txtVersion.text = string.Format("{0}_{1}_{2}", PlatformUtil.GetInstance().GetChannelId(), AppConst.GameVerName, AppConst.GameVerCode); this.txtCheckUpdateTips = base.transform.FindChild("ImgTips/TxtCheckTips").GetComponent <Text>(); this.txtCheckUpdateTips.text = Util.GetDesConfig("requestGameConfigIng"); this.transUpgradeTips = base.transform.FindChild("ObjUpgradeTips"); this.rectTransContent = this.transUpgradeTips.FindChild("ScrollView/Viewport/Content").GetComponent <RectTransform>(); this.txtUpdateTips = this.transUpgradeTips.FindChild("ScrollView/Viewport/Content/Text").GetComponent <Text>(); Button component = this.transUpgradeTips.FindChild("Button").GetComponent <Button>(); component.onClick.RemoveAllListeners(); component.onClick.AddListener(new UnityAction(this.OnBtnClickUpdate)); Text component2 = base.transform.FindChild("ObjTips/TxtWarn").GetComponent <Text>(); component2.text = Util.GetDesConfig("txtWarn"); Text component3 = base.transform.FindChild("ObjTips/TxtInformation").GetComponent <Text>(); component3.text = Util.GetDesConfig("txtInformation"); }
public static void OpenCamera(Action <string> completeCallback) { PlatformUtil.GetInstance().OpenCamera(completeCallback); }
public static void OpenPhotoAlbum(Action <string> completeCallback) { PlatformUtil.GetInstance().OpenPhotoAlbum(completeCallback); }
public static void StartRecording(Action <string> completeCallback) { PlatformUtil.GetInstance().StartRecording(completeCallback); }
public static string GetXGPushToken() { return(PlatformUtil.GetInstance().GetXGPushToken()); }
public static void OpenWebView(string url, Rect viewRect, Action <bool> completeCallback) { Debug.Log("OpenWebView:" + url); PlatformUtil.GetInstance().OpenWebView(url, viewRect, completeCallback); }
public static void CloseWebView() { PlatformUtil.GetInstance().CloseWebView(); }
public static void FinishRecording() { PlatformUtil.GetInstance().FinishRecording(); }
public void GenerateSessionId() { this.sessionId = PlatformUtil.GetInstance().GetSessionId(true); }
public static void GetAudioDuration(string audioFile, Action <int> completeCallback) { PlatformUtil.GetInstance().GetAudioDuration(audioFile, completeCallback); }
public static void TranslateAudio(string audioFile, Action <string> completeCallback) { PlatformUtil.GetInstance().TranslateAudio(audioFile, completeCallback); }
public static void StopAduio() { PlatformUtil.GetInstance().StopAudio(); }
public static void PlayAudio(string audioFile) { PlatformUtil.GetInstance().PlayAudio(audioFile); }