public static string BuildName(string baseName, LevelZonesID levelZoneID, PrefixType prefixType, SufixType sufixType) { string prefixTypeString = GetPrefix(prefixType); string sufix = GetSufix(sufixType); return(levelZoneID.ToString() + "_" + prefixTypeString + "_" + baseName + "_" + sufix); }
public static string BuildBaseLevelPath(string LevelBasePath, LevelZonesID AdventureLevelID, LevelZonesID LevelZonesID) { var directoryPath = LevelBasePath + "/" + AdventureLevelID.ToString(); if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); } var scenePath = directoryPath + "/" + LevelZonesID.ToString() + ".unity"; return(scenePath); }
public static string BuilChunkPath(string LevelBasePath, LevelZonesID AdventureLevelID, LevelZoneChunkID LevelZoneChunkID) { var directoryPath = LevelBasePath + "/" + AdventureLevelID.ToString(); if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); } directoryPath = directoryPath + "/Chunks"; if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); } return(directoryPath + "/" + LevelZoneChunkID.ToString() + "_Chunk.unity"); }
private void OnLevelChange(LevelZonesID nextZone, LevelChangeType LevelChangeType) { isNewZoneLoading = true; List <AsyncOperation> chunkOperations = null; if (LevelChangeType == LevelChangeType.PUZZLE_TO_PUZZLE) { chunkOperations = LevelManagerEventManager.Get().OnPuzzleToPuzzleLevel(nextZone); } else if (LevelChangeType == LevelChangeType.FROM_STARTMENU) { chunkOperations = LevelManagerEventManager.Get().OnStartMenuToLevel(nextZone); } foreach (var chunkOperation in chunkOperations) { chunkOperation.allowSceneActivation = false; } Coroutiner.Instance.StopAllCoroutines(); Coroutiner.Instance.StartCoroutine(this.SceneTrasitionOperation(chunkOperations, nextZone)); }
private void UpdateLevelHierarchyConfiguration(LevelHierarchyConfiguration LevelHierarchyConfiguration, LevelZonesID levelZonesID, LevelZoneChunkID levelZoneChunkID, ref AbstractCreationWizardEditorProfile editorProfile) { if (levelZonesID != LevelZonesID.NONE) { LevelHierarchyConfiguration.AddPuzzleChunkLevel(levelZonesID, levelZoneChunkID); editorProfile.LevelHierarchyAdded(LevelHierarchyConfiguration, levelZonesID, levelZoneChunkID); } }
public LevelCompletedTimelineAction(LevelZonesID completedLevelZone) { this.completedLevelZone = completedLevelZone; }
private IEnumerator SceneTrasitionOperation(List <AsyncOperation> chunkOperations, LevelZonesID nextZone) { yield return(new WaitForListOfAsyncOperation(chunkOperations)); foreach (var chunkOperation in chunkOperations) { chunkOperation.allowSceneActivation = true; } isNewZoneLoading = false; var nextZoneSceneName = LevelManagementConfigurationGameObject.Get().LevelZonesSceneConfiguration.GetSceneName(nextZone); SceneManager.LoadScene(nextZoneSceneName, LoadSceneMode.Single); yield return(null); SceneManager.SetActiveScene(SceneManager.GetSceneByName(nextZoneSceneName)); }
public void OnPuzzleToPuzzleLevel(LevelZonesID nextZone) { OnLevelChange(nextZone, LevelChangeType.PUZZLE_TO_PUZZLE); }
public void OnStartMenuToLevel(LevelZonesID nextZone) { OnLevelChange(nextZone, LevelChangeType.FROM_STARTMENU); }
public List <AsyncOperation> OnStartMenuToLevel(LevelZonesID nextLevel) { StartLevelManager.Get().OnStartLevelChange(nextLevel); return(LevelManager.Get().OnStartMenuToLevel(nextLevel)); }
public List <AsyncOperation> OnPuzzleToPuzzleLevel(LevelZonesID nextLevel) { return(LevelManager.Get().OnAdventureToPuzzleLevel(nextLevel)); }
public virtual void OnPuzzleToPuzzleLevel(LevelZonesID nextZone) { OnLevelChange(nextZone, LevelChangeType.LEVEL_TO_ANOTHER_LEVEL); }
public List <AsyncOperation> OnLevelToAnotherLevel(LevelZonesID nextLevel) { return(LevelManager.Get().OnLevelToAnotherLevel(nextLevel)); }
public StartLevel(LevelZonesID startLevelID) { StartLevelID = startLevelID; }
public void OnStartLevelChange(LevelZonesID startLevelID) { this.StartLevel.StartLevelID = startLevelID; this.StartLevelPersistanceManager.SaveAsync(this.StartLevel); }
public LevelHierarchyAddFeedLine(LevelHierarchyConfiguration levelHierarchyConfiguration, LevelZonesID levelZonesID, LevelZoneChunkID addedChunkID) { this.levelHierarchyConfiguration = levelHierarchyConfiguration; this.levelZonesID = levelZonesID; this.addedChunkID = addedChunkID; }