public void UnloadLevel() { if (Level == null) { return; } if (TilesContainer.Instance) { Destroy(TilesContainer.Instance.gameObject); } TilesContainer.Instance = null; GameManager.Instance.CharacterManager.UnloadCharacters(); SceneObjectManager.Instance.UnloadSceneObjects(); Logger.Log(Logger.Initialisation, "Unload level {0}", Level); Level.Tiles.Clear(); Level.TilesByLocation.Clear(); CameraManager.Instance.ResetCameras(); Level = null; NumberOfUnmarkedTiles = -1; }
public void SetupLevel(MazeLevelData mazeLevelData) { Level = InGameMazeLevel.Create(mazeLevelData); InitialiseTileAttributes(); Logger.Log("Start scan..."); IEnumerator coroutine = ScanCoroutine(); StartCoroutine(coroutine); }