From 45a94e0e09a77647748c960b9dc5dade085a57e3 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 18 Sep 2014 15:20:44 +0100 Subject: [PATCH] Added Node base class for Fungus Script nodes. --- Assets/Examples/TheFacility/TheFacility.unity | Bin 112604 -> 112604 bytes Assets/Fungus/FungusScript/Scripts/Node.cs | 13 +++++++++++++ .../Fungus/FungusScript/Scripts/Node.cs.meta | 8 ++++++++ .../Fungus/FungusScript/Scripts/Sequence.cs | 9 +-------- 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 Assets/Fungus/FungusScript/Scripts/Node.cs create mode 100644 Assets/Fungus/FungusScript/Scripts/Node.cs.meta diff --git a/Assets/Examples/TheFacility/TheFacility.unity b/Assets/Examples/TheFacility/TheFacility.unity index e52166cb8aa8e9bd24860339ccb98562e17b0042..98c8a7681a070012035f5e87f4a79a12d3188c6d 100644 GIT binary patch delta 47 ucmccfp6$+iwuUW?9PSbem^7Ri;9#0Fh?%xUE_?ccWsD-*P23q*6aWBAGYupF delta 50 scmccfp6$+iwuUW?9PSENn6^4Iz`-;yySV(gD@dpkNN?A0XWUW%0E8P3D*ylh diff --git a/Assets/Fungus/FungusScript/Scripts/Node.cs b/Assets/Fungus/FungusScript/Scripts/Node.cs new file mode 100644 index 00000000..69214db5 --- /dev/null +++ b/Assets/Fungus/FungusScript/Scripts/Node.cs @@ -0,0 +1,13 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + + public class Node : MonoBehaviour + { + public Rect nodeRect = new Rect(10, 10, 100, 40); + public string description = ""; + } + +} \ No newline at end of file diff --git a/Assets/Fungus/FungusScript/Scripts/Node.cs.meta b/Assets/Fungus/FungusScript/Scripts/Node.cs.meta new file mode 100644 index 00000000..a3a0e095 --- /dev/null +++ b/Assets/Fungus/FungusScript/Scripts/Node.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 876917146dc4c40f0ba425b6bd6d4e68 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/FungusScript/Scripts/Sequence.cs b/Assets/Fungus/FungusScript/Scripts/Sequence.cs index 2ce68a0a..124f7fdb 100644 --- a/Assets/Fungus/FungusScript/Scripts/Sequence.cs +++ b/Assets/Fungus/FungusScript/Scripts/Sequence.cs @@ -1,6 +1,3 @@ -#if UNITY_EDITOR -using UnityEditor; -#endif using UnityEngine; using System; using System.Collections; @@ -10,12 +7,8 @@ namespace Fungus { [ExecuteInEditMode] - public class Sequence : MonoBehaviour + public class Sequence : Node { - public Rect nodeRect = new Rect(10, 10, 100, 40); - - public string description = ""; - [System.NonSerialized] public Command activeCommand;