示例#1
0
    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();
        }
    }
示例#3
0
    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();
        }
    }
示例#4
0
文件: MadLevel.cs 项目: tng2903/game1
    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();
        }
    }