From b9da6f145ef47e5ae3ae1bfe0807a4eb1c9ffd54 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 9 Nov 2016 13:34:50 +0000 Subject: [PATCH] Added SavePointData class --- Assets/Fungus/Scripts/Commands/SavePoint.cs | 43 +----------------- Assets/Fungus/Scripts/Utils/SavePointData.cs | 45 +++++++++++++++++++ .../Scripts/Utils/SavePointData.cs.meta | 12 +++++ 3 files changed, 58 insertions(+), 42 deletions(-) create mode 100644 Assets/Fungus/Scripts/Utils/SavePointData.cs create mode 100644 Assets/Fungus/Scripts/Utils/SavePointData.cs.meta diff --git a/Assets/Fungus/Scripts/Commands/SavePoint.cs b/Assets/Fungus/Scripts/Commands/SavePoint.cs index 50aab32e..f301e463 100644 --- a/Assets/Fungus/Scripts/Commands/SavePoint.cs +++ b/Assets/Fungus/Scripts/Commands/SavePoint.cs @@ -7,47 +7,6 @@ using UnityEngine.SceneManagement; namespace Fungus { - [System.Serializable] - public class StringVar - { - public string key; - public string value; - } - - [System.Serializable] - public class IntVar - { - public string key; - public int value; - } - - [System.Serializable] - public class FloatVar - { - public string key; - public float value; - } - - [System.Serializable] - public class BoolVar - { - public string key; - public bool value; - } - - [System.Serializable] - public class SaveData - { - public string sceneName; - public string flowchartName; - public string blockName; - - public List stringVars = new List(); - public List intVars = new List(); - public List floatVars = new List(); - public List boolVars = new List(); - } - [CommandInfo("Variable", "Save Point", "Saves current Flowchart state.")] @@ -63,7 +22,7 @@ namespace Fungus protected string CreateSaveData() { - var saveData = new SaveData(); + var saveData = new SavePointData(); var flowchart = GetFlowchart(); diff --git a/Assets/Fungus/Scripts/Utils/SavePointData.cs b/Assets/Fungus/Scripts/Utils/SavePointData.cs new file mode 100644 index 00000000..a9a2a1db --- /dev/null +++ b/Assets/Fungus/Scripts/Utils/SavePointData.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +namespace Fungus +{ + [System.Serializable] + public class StringVar + { + public string key; + public string value; + } + + [System.Serializable] + public class IntVar + { + public string key; + public int value; + } + + [System.Serializable] + public class FloatVar + { + public string key; + public float value; + } + + [System.Serializable] + public class BoolVar + { + public string key; + public bool value; + } + + [System.Serializable] + public class SavePointData + { + public string sceneName; + public string flowchartName; + public string blockName; + + public List stringVars = new List(); + public List intVars = new List(); + public List floatVars = new List(); + public List boolVars = new List(); + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Utils/SavePointData.cs.meta b/Assets/Fungus/Scripts/Utils/SavePointData.cs.meta new file mode 100644 index 00000000..1515f351 --- /dev/null +++ b/Assets/Fungus/Scripts/Utils/SavePointData.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d19fe746c09ac44e2bf310e6a1350b8c +timeCreated: 1478698399 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: