void FinishMap() { Debug.Log("Map build time: " + (Time.realtimeSinceStartup - time)); title.DisableCamera(); CreatePlayer(); if (midiEnabled) { PlayMidi(mapinfo[currentMap].music); } if (multigen != null && Settings.Get("nomonsters", "false") == "false") { mapBuilder.BuildLevelEntities(multigen); } buildingMap = false; GameObject.Destroy(GameObject.Find("CLEAR")); HUD.SetMapName(mapinfo[currentMap].name); }
void BuildMap(string mapName) { if (menuActive) { menu.Show(false, true); menuActive = false; } if (mapBuilder != null) { mapBuilder.Destroy(); } currentMap = mapName; mapBuilder = new DoomMapBuilder(wad, new DoomMapData(wad, mapName)); mapBuilder.BuildMap(); mapBuilder.BuildPlayer(playerPrefab); if (wad.multigen != null) { mapBuilder.BuildLevelEntities(Settings.Get("nomonsters", "false") == "false"); } title.DisableCamera(); if (midiEnabled) { PlayMidi(mapinfo[currentMap].music); } HUDObject.SetActive(true); HUD.SetMapName(mapinfo[currentMap].name); stBarObject.SetActive(true); }