public async UniTask <string> LoadAsyncAsRawString() { if (ParamValidate() is false) { return(null); } var spreadSheetJson = await DownloadSpreadSheet(); if (spreadSheetJson is null) { return(null); } var response = ParseSpreadSheetJson(spreadSheetJson); if (response is null) { return(null); } var result = ParseResponseAsRawCsvString(response); PostLoad?.Invoke(); return(result); }
/// <inheritdoc /> public void Load() { PreLoad?.Invoke(this, new LoadEventArgs(Assets)); InternalLoad(); PostLoad?.Invoke(this, new LoadEventArgs(Assets)); }
/// <inheritdoc /> public void Load() { PreLoad?.Invoke(this, new LoadEventArgs(this.Assets)); foreach (Cursor mouseCursor in Cursor.All) { mouseCursor.Load(Assets); } PostLoad?.Invoke(this, new LoadEventArgs(this.Assets)); }
internal void PostGameLoad() { _pathfindingManager = new PathfindingManager(this); // Invoke the Post Load event down the chain. PostLoad?.Invoke(this, EventArgs.Empty); // set isLoaded to true: IsLoaded = true; // Post load event completed. Drop all handlers. PostLoad = null; }
/// <inheritdoc /> public void Load() { PreLoad?.Invoke(this, new LoadEventArgs(Assets)); foreach (Dialog dialog in Dialogs) { dialog.Load(); } foreach (Window window in Windows) { window.Load(); } Mouse.Load(); PostLoad?.Invoke(this, new LoadEventArgs(Assets)); }
public void Load(NodeGraphData graphData) { NodeEditor.Logger.Log <NodeGraph>("Initializing..."); Unload(); NodeEditor.Logger.Log <NodeGraph>("Reading from graph data..."); if (string.IsNullOrEmpty(graphData.GraphType)) { NodeEditor.Logger.LogWarning <NodeGraph>("Loading graph with no graph type. Defaulting..."); GraphType = _defaultGraphType; } else { var type = Type.GetType(graphData.GraphType); NodeEditor.Assertions.IsNotNull(type, "Invalid graph type."); if (type != null) { GraphType = Activator.CreateInstance(type) as NodeGraphType; NodeEditor.Logger.Log <NodeGraph>("Graph type set to '{0}'", GraphType.GetType().ToString()); } else { GraphType = _defaultGraphType; NodeEditor.Logger.Log <NodeGraph>("Graph type invalid. Setting to default."); } } graphData.Variables.ForEach(variable => AddVariable(variable)); graphData.Nodes.ForEach(x => AddNode(x)); graphData.Constants.ForEach(x => AddNodeConstant(x)); graphData.VariableNodes.ForEach(x => AddNodeVariable(x)); graphData.Connections.ForEach(connectionData => Connect(connectionData)); if (PostLoad != null) { PostLoad.Invoke(this, graphData); } }
static void Load(SaveFile saveFile) { Migrations.Migrate(saveFile); PreLoad?.Invoke(); GameTime.save = saveFile.gameTime; CurrencySystem.instance.save = saveFile.currency; ConveyorSystem.instance.save = saveFile.conveyor; MachineSystem.instance.save = saveFile.machine; TileSelectionManager.instance.save = saveFile.tileSelection; OverviewCameraController.instance.save = saveFile.overviewCameraController; Analytics.instance.save = saveFile.analytics; BackgroundMusic.instance.SetSave(in saveFile.backgroundMusic); InterfaceSelectionManager.instance.SetSave(in saveFile.interfaceSelection); MachineGroupAchievements.instance.SetSave(in saveFile.machineGroupAchievements); MachineUnlockSystem.instance.SetSave(in saveFile.machineUnlocks); ProgressionStore.instance.SetSave(in saveFile.progressionSystem); SpacePlatform.SetSave(in saveFile.spacePlatforms); PostLoad?.Invoke(); LoadComplete?.Invoke(); }
/// <inheritdoc /> public void Load() { PreLoad?.Invoke(this, new LoadEventArgs(Assets)); this.background = this.Assets.CreateTexture2D(1, 1); background.SetData(new[] { Background }); InternalLoad(); if (!isWidthSet) { Width = DefaultWidth; } if (!isHeightSet) { Height = DefaultHeight; } this.IsLoaded = true; PostLoad?.Invoke(this, new LoadEventArgs(Assets)); }