private List <MadLevelScene> ScenesInOrder(MadLevelScene currentLevel) { List <MadLevelScene> scenes = new List <MadLevelScene>(); scenes.AddRange(scenesBefore); scenes.Add(currentLevel); scenes.AddRange(scenesAfter); return(scenes); }
public bool CanContinue(MadLevelScene currentLevel, int progress) { var scenes = ScenesInOrder(currentLevel); if (scenes.Count > progress + 1) { return(true); } return(false); }
public AsyncOperation ContinueAsync(MadLevelScene currentLevel, int progress) { if (!CheckCanContinue(currentLevel, progress)) { return null; } var scenes = ScenesInOrder(currentLevel); var scene = scenes[progress + 1]; MadLevel.currentExtensionProgress = progress + 1; return scene.LoadAsync(); }
public void Continue(MadLevelScene currentLevel, int progress) { if (!CheckCanContinue(currentLevel, progress)) { return; } var scenes = ScenesInOrder(currentLevel); var scene = scenes[progress + 1]; MadLevel.currentExtensionProgress = progress + 1; scene.Load(); }
private bool CheckCanContinue(MadLevelScene currentLevel, int progress) { if (!CanContinue(currentLevel, progress)) { Debug.LogError( "Cannot continue the level, this is the last scene. Please use MadLevel.CanContinue() to check " + "if level can be continued. Now you have to use MadLevel.LoadNext(), MadLevel.LoadLevelByName() or similar."); return(false); } return(true); }
public AsyncOperation ContinueAsync(MadLevelScene currentLevel, int progress) { if (!CheckCanContinue(currentLevel, progress)) { return(null); } var scenes = ScenesInOrder(currentLevel); var scene = scenes[progress + 1]; MadLevel.currentExtensionProgress = progress + 1; return(scene.LoadAsync()); }
private bool CheckCanContinue(MadLevelScene currentLevel, int progress) { if (!CanContinue(currentLevel, progress)) { Debug.LogError( "Cannot continue the level, this is the last scene. Please use MadLevel.CanContinue() to check " + "if level can be continued. Now you have to use MadLevel.LoadNext(), MadLevel.LoadLevelByName() or similar."); return false; } return true; }
private List<MadLevelScene> ScenesInOrder(MadLevelScene currentLevel) { List<MadLevelScene> scenes = new List<MadLevelScene>(); scenes.AddRange(scenesBefore); scenes.Add(currentLevel); scenes.AddRange(scenesAfter); return scenes; }
public bool CanContinue(MadLevelScene currentLevel, int progress) { var scenes = ScenesInOrder(currentLevel); if (scenes.Count > progress + 1) { return true; } return false; }