Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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");
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
 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);
     }
 }
Ejemplo n.º 6
0
 public LevelCompletedTimelineAction(LevelZonesID completedLevelZone)
 {
     this.completedLevelZone = completedLevelZone;
 }
Ejemplo n.º 7
0
        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));
        }
Ejemplo n.º 8
0
 public void OnPuzzleToPuzzleLevel(LevelZonesID nextZone)
 {
     OnLevelChange(nextZone, LevelChangeType.PUZZLE_TO_PUZZLE);
 }
Ejemplo n.º 9
0
 public void OnStartMenuToLevel(LevelZonesID nextZone)
 {
     OnLevelChange(nextZone, LevelChangeType.FROM_STARTMENU);
 }
Ejemplo n.º 10
0
 public List <AsyncOperation> OnStartMenuToLevel(LevelZonesID nextLevel)
 {
     StartLevelManager.Get().OnStartLevelChange(nextLevel);
     return(LevelManager.Get().OnStartMenuToLevel(nextLevel));
 }
Ejemplo n.º 11
0
 public List <AsyncOperation> OnPuzzleToPuzzleLevel(LevelZonesID nextLevel)
 {
     return(LevelManager.Get().OnAdventureToPuzzleLevel(nextLevel));
 }
Ejemplo n.º 12
0
 public virtual void OnPuzzleToPuzzleLevel(LevelZonesID nextZone)
 {
     OnLevelChange(nextZone, LevelChangeType.LEVEL_TO_ANOTHER_LEVEL);
 }
Ejemplo n.º 13
0
 public List <AsyncOperation> OnLevelToAnotherLevel(LevelZonesID nextLevel)
 {
     return(LevelManager.Get().OnLevelToAnotherLevel(nextLevel));
 }
Ejemplo n.º 14
0
 public StartLevel(LevelZonesID startLevelID)
 {
     StartLevelID = startLevelID;
 }
Ejemplo n.º 15
0
 public void OnStartLevelChange(LevelZonesID startLevelID)
 {
     this.StartLevel.StartLevelID = startLevelID;
     this.StartLevelPersistanceManager.SaveAsync(this.StartLevel);
 }
Ejemplo n.º 16
0
 public LevelHierarchyAddFeedLine(LevelHierarchyConfiguration levelHierarchyConfiguration, LevelZonesID levelZonesID, LevelZoneChunkID addedChunkID)
 {
     this.levelHierarchyConfiguration = levelHierarchyConfiguration;
     this.levelZonesID = levelZonesID;
     this.addedChunkID = addedChunkID;
 }