public void OnGetServerListDone() { //拉取到服务器列表后 Control("Servercfg").GetComponent <Button>().onClick.RemoveAllListeners(); Control("Servercfg").GetComponent <Button>().onClick.AddListener(() => { Main.Ins.DialogStateManager.ChangeState(Main.Ins.DialogStateManager.ServerListDialogState); }); //保存的列表最少有一项默认的 if (CombatData.Ins.Server == null) { CombatData.Ins.Server = CombatData.Ins.Servers[0]; } OnSelectService(); GameObject Services = Control("Services", WndObject); serverRoot = Control("Content", Services); int childNum = serverRoot.transform.childCount; for (int i = 0; i < childNum; i++) { GameObject.Destroy(serverRoot.transform.GetChild(i).gameObject); } for (int i = 0; i < CombatData.Ins.Servers.Count; i++) { InsertServerItem(CombatData.Ins.Servers[i], i); } TcpClientProxy.Ins.ReStart(); if (WaitDialogState.Exist()) { WaitDialogState.State.WaitExit(0.5f); } }
public void Init() { ActiveState = new List <PersistState>(); ReconnectDialogState = new ReconnectDialogState(); GameOverlay = new GameOverlayDialogState(); FightState = new FightState(); ReplayState = new ReplayState(); NickNameDialogState = new NickNameDialogState(); BattleStatusDialogState = new BattleStatusDialogState(); ConnectServerState = new ConnectServerDialogState(); PlayerDialogState = new PlayerDialogState(); ChatDialogState = new ChatDialogState(); PsdEditDialogState = new PsdEditDialogState(); RoomChatDialogState = new RoomChatDialogState(); LoadingEx = new LoadingEXDialogState(); ItemInfoDialogState = new ItemInfoDialogState(); GunShootDialogState = new GunShootDialogState(); TipDialogState = new TipDialogState(); WaitDialogState = new WaitDialogState(); RecordSelectState = new RecordSelectState(); ScriptInputDialogState = new ScriptInputDialogState(); }
public void Init() { WaitDialogState = new WaitDialogState(null); }