| | |
| | | using Snxxz.UI;
|
| | | using LitJson;
|
| | | using System.IO;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class DebugUtility : Singleton<DebugUtility>
|
| | |
| | | public int debugBranch = -1;
|
| | |
|
| | | public bool isWhiteListAccount { get; private set; }
|
| | |
|
| | | public bool autoLogin { get; private set; }
|
| | |
|
| | | public void Init()
|
| | | {
|
| | |
| | | DebugEx.EnableLogError = false;
|
| | | DebugEx.EnableNetLog = false;
|
| | | }
|
| | |
|
| | | autoLogin = Resources.Load<TextAsset>("AutoLogin") != null;
|
| | | if (autoLogin)
|
| | | {
|
| | | var update = new LogicUpdate(3f);
|
| | | update.Start(OnAutoLoginUpdate);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnAutoLoginUpdate()
|
| | | {
|
| | | if (StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | var loginWin = WindowCenter.Instance.Get<LoginWin>();
|
| | | if (loginWin != null)
|
| | | {
|
| | | var accountIpf = loginWin.transform.FindComponent("InputField", "Container_Account/AccountInput");
|
| | | if (accountIpf != null)
|
| | | {
|
| | | (accountIpf as InputField).text = StringUtility.Contact("Test_", UnityEngine.Random.Range(10000, 99999));
|
| | | }
|
| | |
|
| | | var enterGame = loginWin.transform.FindComponent("Button", "Container_EnterGame/LoginButton");
|
| | | (enterGame as Button).onClick.Invoke();
|
| | | }
|
| | | }
|
| | |
|
| | | if (StageLoad.Instance.currentStage is SelectRoleStage)
|
| | | {
|
| | | var win = WindowCenter.Instance.Get<SelectRoleWin>();
|
| | | if (win != null)
|
| | | {
|
| | | var enterGame = win.transform.FindComponent("Button", "Container_Right/Btn_EnterGame");
|
| | | if (enterGame is Button)
|
| | | {
|
| | | (enterGame as Button).onClick.Invoke();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (StageLoad.Instance.currentStage is CreateRoleStage)
|
| | | {
|
| | | var win = WindowCenter.Instance.Get<CreateRoleWin>();
|
| | | if (win != null)
|
| | | {
|
| | | var enterGame = win.transform.FindComponent("Button", "Container_Right/Btn_CreateRole");
|
| | | if (enterGame is Button)
|
| | | {
|
| | | (enterGame as Button).onClick.Invoke();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void CreateDebugRoot()
|