private void CompileAllScripts(ScriptCompileCallback callback) { this.compileCallback = callback; string code = world.ScriptManager.CreateCode(); compileTask = Task.Run(() => world.ScriptManager.Compile(code)); editorForm.statusLabelTask.Text = "Compiling scripts."; }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- public EditorControl(EditorForm editorForm) { this.editorForm = editorForm; //this.propertyGridControl = null; this.worldFilePath = String.Empty; this.worldFileName = "untitled"; this.world = null; this.level = null; this.tileset = null; this.zone = null; this.rewardManager = null; this.inventory = null; this.timer = null; this.ticks = 0; this.roomSpacing = 1; this.playAnimations = false; this.isInitialized = false; this.hasMadeChanges = false; this.needsRecompiling = false; this.compileTask = null; this.compileCallback = null; this.currentLayer = 0; this.currentToolIndex = 0; this.aboveTileDrawMode = TileDrawModes.Fade; this.belowTileDrawMode = TileDrawModes.Fade; this.showRewards = true; this.showGrid = false; this.showEvents = false; this.highlightMouseTile = true; this.selectedRoom = -Point2I.One; this.selectedTilesetTile = Point2I.Zero; this.selectedTilesetTileData = null; this.playerPlaceMode = false; }
public void CompileScript(Script script, ScriptCompileCallback callback) { this.compileCallback = callback; compileTask = ScriptEditorCompiler.CompileScriptAsync(script); }