// Use this for initialization void Start() { Init(); MgrScene.SetViewRoot(ModUIUtils.GetChild <Transform> (transform, "SceneViewRoot")); MgrPopup.SetPopupRoot(ModUIUtils.GetChild <Transform> (transform, "PopupViewRoot")); MgrScene.GotoScene("Scene1", "main", SceneAnimation.none, 0.3f, () => { Log.Debug("main Scene1 Done~", ModUtils.documentsDirectory); }); }
public override void OnUIEvent(XLAF_UIEvent e) { Log.Debug("OnUIEvent", e); if (e.phase == Phase.Click) { if (e.target.name == "btn1") { // MgrAudio.PlaySound ("s_click"); MgrScene.GotoScene("Scene2", "0000123", Main.anim, 1f, () => { Log.Debug("Scene2 Done~"); }); // // MgrPopup.Show ("Popup1", "55892", SceneAnimation.fade, 1f, () => { // Log.Debug ("Popup1 Done~"); // }); #if UNITY_ANDROID && !UNITY_EDITOR AndroidJavaClass jc = new AndroidJavaClass("plugintest.albert.mylibrary.PhoneInfo"); string module = jc.CallStatic <string> ("getPhoneModule"); AndroidJavaObject telephonyManager = new AndroidJavaObject("android.telephony.TelephonyManager"); string did = telephonyManager.Call <string> ("getLine1Number"); // string did = jc.CallStatic<string> ("getDeviceId"); string totalMemory = jc.CallStatic <string> ("getTotalMemory"); // string phoneNumber = jc.CallStatic<string> ("getPhoneNumber"); string[] cpu = jc.CallStatic <string[]> ("getCpuInfo"); Log.Debug("~~~~~:", module, "|", did, "|", totalMemory, "|", cpu [0], "|", cpu [1]); #endif } else if (e.target.name == "btn2") { MgrPopup.Show("Popup2", "2222", SceneAnimation.fade, 1f, () => { Log.Debug("Popup2 Done~"); }); } } }
private void btn_click() { MgrAudio.PlaySound("s_click.mp3"); MgrScene.GotoScene("Scene1", 998855, Main.anim, 1f, cb); }