public void Load(MadLevelConfiguration.Level level) { MadLevel.currentExtension = this; MadLevel.currentExtensionProgress = 0; if (scenesBefore.Count != 0) { var scene = scenesBefore[0]; MadLevel.lastPlayedLevelName = MadLevel.currentLevelName; MadLevel.currentLevelName = level.name; scene.Load(); } else { level.Load(); } }
public void Load(MadLevelConfiguration.Level level) { if (Application.isLoadingLevel) { Debug.LogWarning("The level is already loading"); return; } MadLevel.currentExtension = this; MadLevel.currentExtensionProgress = 0; if (scenesBefore.Count != 0) { var scene = scenesBefore[0]; MadLevel.lastPlayedLevelName = MadLevel.currentLevelName; MadLevel.currentLevelName = level.name; MadLevel.arguments = level.arguments; scene.Load(); } else { level.Load(); } }
static void LoadLevel(MadLevelConfiguration.Level level) { if (!CheckLevelLoading()) { return; } currentExtension = null; // extension should be reset when loading like this if (level.hasExtension) { var extension = level.extension; extension.Load(level); } else { level.Load(); } }
static void LoadLevel(MadLevelConfiguration.Level level) { currentExtension = null; // loading level that way resets the extension if (level.hasExtension) { var extension = level.extension; extension.Load(level); } else { level.Load(); } }