private void SetLevelSettings() { if (currentLevelSettings == null) { return; } if (!string.IsNullOrEmpty(currentLevelSettings.precode)) { PMWrapper.preCode = currentLevelSettings.precode; } if (currentLevelSettings.taskDescription != null && !ignorePlayingGuides) { PMWrapper.SetTaskDescription(currentLevelSettings.taskDescription.header, currentLevelSettings.taskDescription.body); } else { PMWrapper.SetTaskDescription("", ""); } if (currentLevelSettings.rowLimit > 0) { PMWrapper.codeRowsLimit = currentLevelSettings.rowLimit; } if (currentLevelSettings.availableFunctions != null) { List <IEmbeddedType> availableFunctions = CreateFunctionsFromStrings(currentLevelSettings.availableFunctions); PMWrapper.AddCompilerFunctions(availableFunctions); } }
private void SetLevelSettings() { UISingleton.instance.saveData.ClearPreAndMainCode(); if (currentLevelSettings == null) { return; } if (!String.IsNullOrEmpty(currentLevelSettings.precode)) { PMWrapper.preCode = currentLevelSettings.precode; } if (!String.IsNullOrEmpty(currentLevelSettings.startCode)) { PMWrapper.AddCodeAtStart(currentLevelSettings.startCode); } if (currentLevelSettings.taskDescription != null) { PMWrapper.SetTaskDescription(currentLevelSettings.taskDescription.header, currentLevelSettings.taskDescription.body); } else { PMWrapper.SetTaskDescription("", ""); } if (currentLevelSettings.rowLimit > 0) { PMWrapper.codeRowsLimit = currentLevelSettings.rowLimit; } if (currentLevelSettings.availableFunctions != null) { var availableFunctions = CreateFunctionsFromStrings(currentLevelSettings.availableFunctions); PMWrapper.AddCompilerFunctions(availableFunctions); } }