You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
799 B
40 lines
799 B
10 years ago
|
using UnityEditor;
|
||
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
10 years ago
|
namespace Fungus
|
||
10 years ago
|
{
|
||
|
[CustomEditor (typeof(Call))]
|
||
10 years ago
|
public class CallEditor : CommandEditor
|
||
10 years ago
|
{
|
||
10 years ago
|
protected SerializedProperty targetBlockProp;
|
||
10 years ago
|
|
||
10 years ago
|
protected virtual void OnEnable()
|
||
10 years ago
|
{
|
||
10 years ago
|
targetBlockProp = serializedObject.FindProperty("targetBlock");
|
||
10 years ago
|
}
|
||
|
|
||
10 years ago
|
public override void DrawCommandGUI()
|
||
|
{
|
||
10 years ago
|
serializedObject.Update();
|
||
|
|
||
10 years ago
|
Call t = target as Call;
|
||
|
|
||
10 years ago
|
Flowchart flowchart = t.GetFlowchart();
|
||
|
if (flowchart == null)
|
||
10 years ago
|
{
|
||
|
return;
|
||
|
}
|
||
|
|
||
10 years ago
|
BlockEditor.BlockField(targetBlockProp,
|
||
|
new GUIContent("Target Block", "Block to call"),
|
||
10 years ago
|
new GUIContent("<Continue>"),
|
||
10 years ago
|
flowchart);
|
||
10 years ago
|
|
||
|
serializedObject.ApplyModifiedProperties();
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
}
|