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 async ETTask EnterMap(this UILobbyComponent self) { await EnterMapHelper.EnterMapAsync(self.ZoneScene()); await UIHelper.Remove(self.ZoneScene(), UIType.UILobby); }
public static void EnterMap(this UILobbyComponent self) { EnterMapHelper.EnterMapAsync(self.ZoneScene()).Coroutine(); }
public static void OnEnterBtnClick(this UILobbyView self) { EnterMapHelper.EnterMapAsync(self.zoneScene).Coroutine(); }