public void ShowChooseServerUIFormCreateChr(bool isConnectSuccess = true) { ShowChooseServerUI(isConnectSuccess); m_onChooseServerUIBackBtnUp = () => { if (!m_isConnectSuccess) { MogoMessageBox.Info("Please select a server."); return; } MogoWorld.LoadCharacterScene(); }; m_onChooseServerGridUp = (index) => { if (index != 0 && m_isConnectSuccess && SystemConfig.SelectedServerIndex == index) { MogoWorld.LoadCharacterScene(); return; } //Debug.Log(index); SystemConfig.SelectedServerIndex = index; var server = SystemConfig.GetServerInfoByIndex(index); Debug.Log("server.id: " + server.id); if (server != null) { SystemConfig.Instance.SelectedServer = server.id; } SystemConfig.SaveConfig(); MogoWorld.Login(); //EventDispatcher.TriggerEvent<int>(Events.UIAccountEvent.OnChangeServer, id); }; }
private void FindServerSucc(string ip) { UIManager.I.CloseUI <WaitingUIMgr>(); MsgBoxInfo info = new MsgBoxInfo(); if (string.IsNullOrEmpty(ip)) { info.Content = LanguageData.GetContent(6); info.BtnOkText = LanguageData.GetContent(5); info.okAction = () => { UIManager.I.CloseUI <MsgBoxUILogic>(); UIManager.I.ShowUI <WaitingUIMgr>(); EventDispatcher.TriggerEvent(FindServerEvent.FindServerStart); }; info.cancelAction = () => { UIManager.I.CloseUI <MsgBoxUILogic>(); }; } else { info.Content = LanguageData.GetContent(7, ip); info.BtnOkText = LanguageData.GetContent(3); info.okAction = () => { Close(); MogoWorld.ConnectServer(ip, 43998); MogoWorld.Login(); }; info.cancelAction = () => { UIManager.I.CloseUI <MsgBoxUILogic>(); }; } UIManager.I.ShowUI <MsgBoxUILogic>(info); MogoWorld.ServerIP = ip; }
private void OnLoginDoneSSJJ() { SetupInfoSSJJ(); MogoGlobleUIManager.Instance.ShowGlobleStaticText(false, "Login..."); //IsLoginDone = true; MogoWorld.Login(); //IsLoginDone = false; }
private void OnLoginDoneUnion() { SetupInfoUnion(); MogoGlobleUIManager.Instance.ShowGlobleStaticText(false, "Login..."); //IsLoginDone = true; //MogoMsgBox.Instance.ShowFloatingText("username:"******",sessionId" + sessionId + ",suid:" + suid); MogoWorld.Login(); //IsLoginDone = false; }
private void OnBtnJoin(MogoUIBtn btn) { if (CheckNameError()) { return; } MogoWorld.ConnectServer(m_inputServerIP.text, 43998); MogoWorld.Login(); MogoWorld.ServerIP = m_inputServerIP.text; }
private void OnBtnCreate(MogoUIBtn btn) { if (CheckNameError()) { return; } string serverIp = MogoWorld.CreateServer(); MogoWorld.IsSingleMatch = true; MogoWorld.ConnectServer(serverIp, 43998); MogoWorld.Login(); MogoWorld.ServerIP = serverIp; }
void OnLoginUILoginUp() { //ServerProxy.Instance.Login(LoginUIViewManager.Instance.GetUserName(), // LoginUIViewManager.Instance.GetPassword(), "20"); string passport = LoginUIViewManager.Instance.GetUserName(); string password = LoginUIViewManager.Instance.GetPassword(); MogoWorld.passport = passport; MogoWorld.password = password; MogoWorld.Login(); //SystemConfig.Instance.IsAutoLogin = LoginUILogicManager.Instance.IsAutoLogin; //SystemConfig.Instance.IsSavePassport = LoginUILogicManager.Instance.IsSaveUserName; //if (SystemConfig.Instance.IsSavePassport) //{ SystemConfig.Instance.Passport = passport; //if (SystemConfig.Instance.IsAutoLogin) SystemConfig.Instance.Password = password; //else // SystemConfig.Instance.Password = "******"; //} //else //{ // SystemConfig.Instance.Passport = " "; // SystemConfig.Instance.Password = "******"; //} SystemConfig.SaveConfig(); //MogoUIManager.Instance.ShowMogoChooseCharacterUI(); //EventDispatcher.TriggerEvent<string, string>(Events.UIAccountEvent.OnLogin, passport, password); //Debug.Log("LoginUp"); }
void OnGUI() { if (GUI.Button(new Rect(0, 0, 10, 10), "")) { m_switch = !m_switch; } if (!m_switch) { return; } if (GUI.Button(new Rect(10, 0, 90, 100), "touch")) { foreach (var item in MogoWorld.m_dataMapManager.ReachStarList) { foreach (var soliders in item.SoldierDic.Values) { foreach (var solider in soliders.Values) { solider.OnHit(); } } } //MogoWorld.thePlayer.controllerInput.SetStickType(StickType.Touch); } serverIp = GUI.TextArea(new Rect(0, 100, 150, 50), serverIp); if (GUI.Button(new Rect(100, 0, 100, 100), "CreateServer")) { serverIp = MogoWorld.CreateServer(); } if (GUI.Button(new Rect(200, 0, 100, 100), "login")) { MogoWorld.ServerIP = serverIp; MogoWorld.ConnectServer(serverIp, 43998); MogoWorld.TmpPlayerName = UtilsEx.GetRandomName(); MogoWorld.Login(); } if (GUI.Button(new Rect(300, 0, 100, 100), "createAvatar")) { MogoWorld.thePlayer.RpcCall("CreateAvatarReq"); } if (GUI.Button(new Rect(400, 0, 100, 100), "vrWidth+")) { MogoWorld.MainCamera.SetVRWidth(true); } if (GUI.Button(new Rect(500, 0, 100, 100), "vrWidth-")) { MogoWorld.MainCamera.SetVRWidth(false); } if (GUI.Button(new Rect(600, 0, 100, 100), "vrRot+")) { MogoWorld.MainCamera.SetVRRotation(true); } if (GUI.Button(new Rect(700, 0, 100, 100), "vrRot-")) { MogoWorld.MainCamera.SetVRRotation(false); } if (GUI.Button(new Rect(800, 0, 100, 100), "vr")) { MogoWorld.MainCamera.SwitchVR(); } if (GUI.Button(new Rect(0, 100, 100, 100), "into main")) { MogoWorld.EnterMainEufloria(1); } if (GUI.Button(new Rect(100, 100, 100, 100), "init map")) { UIManager.I.GetUILogic <MapUIMgr>().InitStarMap(1); } if (GUI.Button(new Rect(200, 100, 100, 100), "remove soldier")) { MogoWorld.thePlayer.RpcCall("RemoveSoldier", MogoWorld.thePlayer.ID, 0, 1, 100, 1); } if (GUI.Button(new Rect(300, 100, 100, 100), "ShowSoldierIntrusionStar")) { //MogoWorld.m_dataMapManager.addSoldierToStar(MogoWorld.thePlayer.ID, 1, 1); //MogoWorld.thePlayer.RpcCall("ArrayedSoldier", 1, 1); // MogoWorld.m_dataMapManager.ShowSoldierIntrusionStar(MogoWorld.thePlayer.ID, 1, 1, 150); } if (GUI.Button(new Rect(400, 100, 100, 100), "stop game")) { //MogoWorld.m_dataMapManager.addSoldierToStar(MogoWorld.thePlayer.ID, 1, 1); //MogoWorld.thePlayer.RpcCall("ArrayedSoldier",1, 2); //UIManager.I.GetUILogic<MapUIMgr>().EraserTexture(); //MogoWorld.IsInGame = false; MogoWorld.thePlayer.RpcCall("GameOver", 1); } if (GUI.Button(new Rect(500, 100, 100, 100), "OpenRangleCheck")) { //MogoWorld.m_dataMapManager.addSoldierToStar(MogoWorld.thePlayer.ID, 1, 1); //MogoWorld.thePlayer.RpcCall("ArrayedSoldier",1, 2); //UIManager.I.GetUILogic<MapUIMgr>().EraserTexture(); UIManager.I.GetUILogic <StarInfoUIMgr>().IsOpenRangleCheck = !UIManager.I.GetUILogic <StarInfoUIMgr>().IsOpenRangleCheck; } }