// Token: 0x0600144E RID: 5198 RVA: 0x00074ECC File Offset: 0x000730CC public string GetMapSceneName(int mapId) { UberstrikeMap mapWithId = this.GetMapWithId(mapId); if (mapWithId != null) { return(mapWithId.SceneName); } return(LocalizedStrings.None); }
// Token: 0x0600144B RID: 5195 RVA: 0x00074E50 File Offset: 0x00073050 public string GetMapDescription(int mapId) { UberstrikeMap mapWithId = this.GetMapWithId(mapId); if (mapWithId != null) { return(mapWithId.Description); } return(LocalizedStrings.None); }
// Token: 0x06000CC2 RID: 3266 RVA: 0x00056418 File Offset: 0x00054618 private void SelectMap(UberstrikeMap map) { this._mapSelected = map; foreach (GameModeType gameModeType in this._modeSelection.Items) { if (this._mapSelected.IsGameModeSupported(gameModeType)) { this._modeSelection.Select(gameModeType); break; } } }
// Token: 0x06001455 RID: 5205 RVA: 0x000750B0 File Offset: 0x000732B0 public void LoadMap(UberstrikeMap map, Action onSuccess) { PickupItem.Reset(); Debug.LogWarning("Loading map: " + map.SceneName); Singleton <SceneLoader> .Instance.LoadLevel(map.SceneName, delegate { if (onSuccess != null) { onSuccess(); } Debug.LogWarning("Finished Loading map"); }); }
// Token: 0x06001452 RID: 5202 RVA: 0x00074F64 File Offset: 0x00073164 private UberstrikeMap AddMapView(MapView mapView, bool isVisible = true, bool isBuiltIn = false) { UberstrikeMap uberstrikeMap = new UberstrikeMap(mapView) { IsVisible = isVisible, IsBuiltIn = isBuiltIn }; UberstrikeMap uberstrikeMap2; if (this._mapsByName.TryGetValue(mapView.SceneName, out uberstrikeMap2)) { uberstrikeMap.View.MapId = uberstrikeMap2.View.MapId; uberstrikeMap.View.Settings = uberstrikeMap2.View.Settings; uberstrikeMap.View.SupportedGameModes = uberstrikeMap2.View.SupportedGameModes; } this._mapsByName[mapView.SceneName] = uberstrikeMap; return(uberstrikeMap); }
// Token: 0x060019A5 RID: 6565 RVA: 0x0008836C File Offset: 0x0008656C protected override void OnRoomEntered(GameRoomData data) { Debug.Log("OnRoomJoined " + this.lastRoomJoined); GameState.Current.Reset(); PopupSystem.ClearAll(); this.lastRoomJoined = data.Number; GameState.Current.ResetRoundStartTime(); base.Peer.FetchServerTimestamp(); switch (data.GameMode) { case GameModeType.DeathMatch: { DeathMatchRoom gameMode = new DeathMatchRoom(data, this); Singleton <GameStateController> .Instance.SetGameMode(gameMode); this.currentRoom = gameMode; break; } case GameModeType.TeamDeathMatch: { TeamDeathMatchRoom gameMode2 = new TeamDeathMatchRoom(data, this); Singleton <GameStateController> .Instance.SetGameMode(gameMode2); this.currentRoom = gameMode2; break; } case GameModeType.EliminationMode: { TeamEliminationRoom gameMode3 = new TeamEliminationRoom(data, this); Singleton <GameStateController> .Instance.SetGameMode(gameMode3); this.currentRoom = gameMode3; break; } default: throw new NotImplementedException("GameMode not supported: " + data.GameMode); } base.AddRoomLogic(this.currentRoom, this.currentRoom.Operations); UberstrikeMap mapWithId = Singleton <MapManager> .Instance.GetMapWithId(data.MapID); if (mapWithId != null) { Singleton <MapManager> .Instance.LoadMap(mapWithId, delegate { GameStateHelper.EnterGameMode(); GameState.Current.MatchState.SetState(GameStateId.PregameLoadout); foreach (GameActorInfo gameActorInfo in GameState.Current.Players.Values) { if (!gameActorInfo.IsSpectator) { GameState.Current.InstantiateAvatar(gameActorInfo); } } this.currentRoom.Operations.SendPowerUpRespawnTimes(PickupItem.GetRespawnDurations()); List <Vector3> positions; List <byte> rotations; Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.NONE, out positions, out rotations); this.currentRoom.Operations.SendSpawnPositions(TeamID.NONE, positions, rotations); Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.RED, out positions, out rotations); this.currentRoom.Operations.SendSpawnPositions(TeamID.RED, positions, rotations); Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.BLUE, out positions, out rotations); this.currentRoom.Operations.SendSpawnPositions(TeamID.BLUE, positions, rotations); global::AvatarBuilder.UpdateLocalAvatar(Singleton <LoadoutManager> .Instance.Loadout.GetAvatarGear()); GameState.Current.RoomData = data; AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Lobby.Operations.SendUpdatePlayerRoom(new GameRoom { Server = new ConnectionAddress(data.Server.ConnectionString), Number = data.Number, MapId = data.MapID }); }); } else { Debug.LogError("Map not found"); } }