public static void OnLogin(this UILoginComponent self) { LoginHelper.Login( self.DomainScene(), ConstValue.LoginAddress, self.account.GetComponent <InputField>().text, self.password.GetComponent <InputField>().text).Coroutine(); }
public static void OnLogin(this UILoginView self) { self.loginBtn.SetInteractable(false); GlobalComponent.Instance.Account = self.account.GetText(); PlayerPrefs.SetString(CacheKeys.Account, self.account.GetText()); PlayerPrefs.SetString(CacheKeys.Password, self.password.GetText()); LoginHelper.Login(self.scene, self.ipaddr.GetText(), self.account.GetText(), self.password.GetText(), () => { self.loginBtn.SetInteractable(true); }).Coroutine(); }
public static async ETTask <Scene> NewRobot(this RobotCase self, int zone, string name) { Scene zoneScene = null; try { zoneScene = SceneFactory.CreateZoneScene(zone, name, self); await LoginHelper.Login(zoneScene, ConstValue.LoginAddress, zone.ToString(), zone.ToString()); await EnterMapHelper.EnterMapAsync(zoneScene); Log.Debug($"create robot ok: {zone}"); return(zoneScene); } catch (Exception e) { zoneScene?.Dispose(); throw new Exception($"RobotCase create robot fail, zone: {zone}", e); } }
private static async ETTask <Scene> NewRobot(this RobotCase self) { int zone = self.GetParent <RobotCaseComponent>().GetN(); Scene zoneScene = null; try { zoneScene = SceneFactory.CreateZoneScene(zone, $"Robot_{zone}", self); await LoginHelper.Login(zoneScene, ConstValue.LoginAddress, zone.ToString(), zone.ToString()); await EnterMapHelper.EnterMapAsync(zoneScene); Log.Debug($"create robot ok: {zone}"); return(zoneScene); } catch (Exception e) { zoneScene?.Dispose(); throw new Exception($"RobotCase create robot fail, zone: {zone}", e); } }
public static void OnLogin(this UILoginComponent self) { LoginHelper.Login(self.DomainScene(), "127.0.0.1:10002", self.account.GetComponent <InputField>().text).Coroutine(); }