Browse Source

Moved new visual scripting code to its own namespace

master
chrisgregan 10 years ago
parent
commit
d0c2e9c961
  1. 2
      Assets/Fungus/Editor/AddOptionCommandEditor.cs
  2. 2
      Assets/Fungus/Editor/CompareCommandEditor.cs
  3. 6
      Assets/Fungus/Editor/FungusCommandEditor.cs
  4. 6
      Assets/Fungus/Editor/FungusEditorWindow.cs
  5. 5
      Assets/Fungus/Editor/FungusScriptEditor.cs
  6. 2
      Assets/Fungus/Editor/SayCommandEditor.cs
  7. 7
      Assets/Fungus/Editor/SequenceEditor.cs
  8. 2
      Assets/Fungus/Editor/SetVariableCommandEditor.cs
  9. BIN
      Assets/Fungus/Tests/Sequence/SequenceTest.unity
  10. 1
      Assets/Fungus/Tests/Sequence/SequenceTestRoom.cs
  11. 2
      Assets/Fungus/VisualScripting/AddOptionCommand.cs
  12. 2
      Assets/Fungus/VisualScripting/CompareCommand.cs
  13. 2
      Assets/Fungus/VisualScripting/ExecuteCommand.cs
  14. 2
      Assets/Fungus/VisualScripting/FungusCommand.cs
  15. 6
      Assets/Fungus/VisualScripting/FungusScript.cs
  16. 2
      Assets/Fungus/VisualScripting/SayCommand.cs
  17. 2
      Assets/Fungus/VisualScripting/Sequence.cs
  18. 6
      Assets/Fungus/VisualScripting/SetVariableCommand.cs
  19. 2
      Assets/Fungus/VisualScripting/Variable.cs
  20. 2
      Assets/Fungus/VisualScripting/WaitCommand.cs

2
Assets/Fungus/Editor/AddOptionCommandEditor.cs

@ -4,7 +4,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
[CustomEditor (typeof(AddOptionCommand))] [CustomEditor (typeof(AddOptionCommand))]

2
Assets/Fungus/Editor/CompareCommandEditor.cs

@ -3,7 +3,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
[CustomEditor (typeof(CompareCommand))] [CustomEditor (typeof(CompareCommand))]

6
Assets/Fungus/Editor/FungusCommandEditor.cs

@ -2,7 +2,9 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Fungus;
namespace Fungus.Script
{
[CustomEditor (typeof(FungusCommand), true)] [CustomEditor (typeof(FungusCommand), true)]
public class FungusCommandEditor : Editor public class FungusCommandEditor : Editor
@ -44,3 +46,5 @@ public class FungusCommandEditor : Editor
DrawDefaultInspector(); DrawDefaultInspector();
} }
} }
}

6
Assets/Fungus/Editor/FungusEditorWindow.cs

@ -3,7 +3,9 @@ using UnityEditor;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Fungus;
namespace Fungus.Script
{
public class FungusEditorWindow : EditorWindow public class FungusEditorWindow : EditorWindow
{ {
@ -284,3 +286,5 @@ public class FungusEditorWindow : EditorWindow
return (command.IsExecuting() || (FungusCommandEditor.selectedCommand == command)); return (command.IsExecuting() || (FungusCommandEditor.selectedCommand == command));
} }
} }
}

5
Assets/Fungus/Editor/FungusScriptEditor.cs

@ -6,6 +6,9 @@ using Fungus;
using Rotorz.ReorderableList; using Rotorz.ReorderableList;
using System.Linq; using System.Linq;
namespace Fungus.Script
{
[CustomPropertyDrawer (typeof(Variable))] [CustomPropertyDrawer (typeof(Variable))]
public class VariableDrawer : PropertyDrawer public class VariableDrawer : PropertyDrawer
{ {
@ -96,3 +99,5 @@ public class FungusScriptEditor : Editor
serializedObject.ApplyModifiedProperties(); serializedObject.ApplyModifiedProperties();
} }
} }
}

2
Assets/Fungus/Editor/SayCommandEditor.cs

@ -4,7 +4,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
[CustomEditor (typeof(SayCommand))] [CustomEditor (typeof(SayCommand))]

7
Assets/Fungus/Editor/SequenceEditor.cs

@ -2,12 +2,13 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Fungus;
namespace Fungus.Script
{
[CustomEditor (typeof(Sequence))] [CustomEditor (typeof(Sequence))]
public class SequenceEditor : Editor public class SequenceEditor : Editor
{ {
static public Sequence SequenceField(GUIContent label, FungusScript fungusScript, Sequence sequence) static public Sequence SequenceField(GUIContent label, FungusScript fungusScript, Sequence sequence)
{ {
if (fungusScript == null) if (fungusScript == null)
@ -72,3 +73,5 @@ public class SequenceEditor : Editor
return keys[newIndex]; return keys[newIndex];
} }
} }
}

2
Assets/Fungus/Editor/SetVariableCommandEditor.cs

@ -3,7 +3,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
[CustomEditor (typeof(SetVariableCommand))] [CustomEditor (typeof(SetVariableCommand))]

BIN
Assets/Fungus/Tests/Sequence/SequenceTest.unity

Binary file not shown.

1
Assets/Fungus/Tests/Sequence/SequenceTestRoom.cs

@ -1,6 +1,7 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using Fungus; using Fungus;
using Fungus.Script;
public class SequenceTestRoom : Room public class SequenceTestRoom : Room
{ {

2
Assets/Fungus/VisualScripting/AddOptionCommand.cs

@ -2,7 +2,7 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
public class AddOptionCommand : FungusCommand public class AddOptionCommand : FungusCommand

2
Assets/Fungus/VisualScripting/CompareCommand.cs

@ -2,7 +2,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
public enum CompareOperator public enum CompareOperator

2
Assets/Fungus/VisualScripting/ExecuteCommand.cs

@ -3,7 +3,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
public class ExecuteCommand : FungusCommand public class ExecuteCommand : FungusCommand

2
Assets/Fungus/VisualScripting/FungusCommand.cs

@ -5,7 +5,7 @@ using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
[RequireComponent(typeof(Sequence))] [RequireComponent(typeof(Sequence))]
public class FungusCommand : MonoBehaviour public class FungusCommand : MonoBehaviour

6
Assets/Fungus/VisualScripting/FungusScript.cs

@ -5,7 +5,9 @@ using UnityEngine;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Fungus;
namespace Fungus.Script
{
public class FungusScript : MonoBehaviour public class FungusScript : MonoBehaviour
{ {
@ -55,3 +57,5 @@ public class FungusScript : MonoBehaviour
return null; return null;
} }
} }
}

2
Assets/Fungus/VisualScripting/SayCommand.cs

@ -3,7 +3,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
public class SayCommand : FungusCommand public class SayCommand : FungusCommand
{ {

2
Assets/Fungus/VisualScripting/Sequence.cs

@ -6,7 +6,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
namespace Fungus namespace Fungus.Script
{ {
public class Sequence : MonoBehaviour public class Sequence : MonoBehaviour

6
Assets/Fungus/VisualScripting/SetVariableCommand.cs

@ -1,6 +1,8 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using Fungus;
namespace Fungus.Script
{
public class SetVariableCommand : FungusCommand public class SetVariableCommand : FungusCommand
{ {
@ -49,3 +51,5 @@ public class SetVariableCommand : FungusCommand
Continue(); Continue();
} }
} }
}

2
Assets/Fungus/VisualScripting/Variable.cs

@ -2,7 +2,7 @@
using System; using System;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus.Script
{ {
public enum VariableType public enum VariableType

2
Assets/Fungus/VisualScripting/WaitCommand.cs

@ -2,7 +2,7 @@ using UnityEngine;
using System; using System;
using System.Collections; using System.Collections;
namespace Fungus namespace Fungus.Script
{ {
public class WaitCommand : FungusCommand public class WaitCommand : FungusCommand

Loading…
Cancel
Save