diff --git a/.gitignore b/.gitignore index 449fd5b..5514081 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ Assets/Scripts/Primitives/FlatBezierRenderer.cs.meta Assets/Scripts/Primitives/Bezier.cs.meta Assets/Scripts/Car/Route.cs.meta +Assets/Scripts/Buttons/SaveStructs.cs.meta diff --git a/.gitignore b/.gitignore index 449fd5b..5514081 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ Assets/Scripts/Primitives/FlatBezierRenderer.cs.meta Assets/Scripts/Primitives/Bezier.cs.meta Assets/Scripts/Car/Route.cs.meta +Assets/Scripts/Buttons/SaveStructs.cs.meta diff --git a/Assets/Scripts/Buttons/SaveButton.cs b/Assets/Scripts/Buttons/SaveButton.cs index 1619830..1cc6a12 100644 --- a/Assets/Scripts/Buttons/SaveButton.cs +++ b/Assets/Scripts/Buttons/SaveButton.cs @@ -10,23 +10,6 @@ public class SaveButton : MonoBehaviour, IPointerDownHandler { public Config config; - [Serializable] - private struct SaveNode { - public Vector3 position; - public string type; - } - - [Serializable] - private struct SaveRoad { - public int start, end; - } - - [Serializable] - private struct SaveStruct { - public List nodes; - public List roads; - } - public void OnPointerDown(PointerEventData eventData) { config.onClick(); List nodes = new List(); diff --git a/.gitignore b/.gitignore index 449fd5b..5514081 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ Assets/Scripts/Primitives/FlatBezierRenderer.cs.meta Assets/Scripts/Primitives/Bezier.cs.meta Assets/Scripts/Car/Route.cs.meta +Assets/Scripts/Buttons/SaveStructs.cs.meta diff --git a/Assets/Scripts/Buttons/SaveButton.cs b/Assets/Scripts/Buttons/SaveButton.cs index 1619830..1cc6a12 100644 --- a/Assets/Scripts/Buttons/SaveButton.cs +++ b/Assets/Scripts/Buttons/SaveButton.cs @@ -10,23 +10,6 @@ public class SaveButton : MonoBehaviour, IPointerDownHandler { public Config config; - [Serializable] - private struct SaveNode { - public Vector3 position; - public string type; - } - - [Serializable] - private struct SaveRoad { - public int start, end; - } - - [Serializable] - private struct SaveStruct { - public List nodes; - public List roads; - } - public void OnPointerDown(PointerEventData eventData) { config.onClick(); List nodes = new List(); diff --git a/Assets/Scripts/Buttons/SaveStructs.cs b/Assets/Scripts/Buttons/SaveStructs.cs new file mode 100644 index 0000000..4596487 --- /dev/null +++ b/Assets/Scripts/Buttons/SaveStructs.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; + +[Serializable] +public struct SaveNode { + public Vector3 position; + public string type; +} + +[Serializable] +public struct SaveRoad { + public int start, end; +} + +[Serializable] +public struct SaveStruct { + public List nodes; + public List roads; +}