Browse Source

Added SavePointData class

master
Christopher 8 years ago
parent
commit
b9da6f145e
  1. 43
      Assets/Fungus/Scripts/Commands/SavePoint.cs
  2. 45
      Assets/Fungus/Scripts/Utils/SavePointData.cs
  3. 12
      Assets/Fungus/Scripts/Utils/SavePointData.cs.meta

43
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<StringVar> stringVars = new List<StringVar>();
public List<IntVar> intVars = new List<IntVar>();
public List<FloatVar> floatVars = new List<FloatVar>();
public List<BoolVar> boolVars = new List<BoolVar>();
}
[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();

45
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<StringVar> stringVars = new List<StringVar>();
public List<IntVar> intVars = new List<IntVar>();
public List<FloatVar> floatVars = new List<FloatVar>();
public List<BoolVar> boolVars = new List<BoolVar>();
}
}

12
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:
Loading…
Cancel
Save