static void DrawProximity() { GUIStyle style = new GUIStyle(); style.richText = true; GUILayout.Label("<size=30><b> Proximity </b> </size>", style); GUILayout.Space(15); objectiveName = EditorGUILayout.TextField("ObjectiveName", objectiveName, GUILayout.Width(332)); player = (GameObject)EditorGUILayout.ObjectField("Player", player, typeof(GameObject), true, GUILayout.Width(350)); target = (GameObject)EditorGUILayout.ObjectField("Target", target, typeof(GameObject), true, GUILayout.Width(350)); radius = EditorGUILayout.FloatField("ZoneRadius", radius, GUILayout.Width(332)); GUILayout.Space(30); ObjectiveEditor.MyParent = (Transform)EditorGUILayout.ObjectField("Parent", ObjectiveEditor.MyParent, typeof(Transform), true, GUILayout.Width(350)); GUILayout.BeginHorizontal(); GUILayout.Space(150); if (GUILayout.Button("Create Objective", GUILayout.Width(180), GUILayout.Height(30))) { ObjectiveEditor.CreateProximityObjective(objectiveName, player, target, radius); objectiveName = string.Empty; player = null; target = null; radius = 0; } GUILayout.EndHorizontal(); }
static void DrawGoal() { GUIStyle style = new GUIStyle(); style.richText = true; GUILayout.Label("<size=30><b> Goal </b> </size>", style); GUILayout.Space(15); objectiveName = EditorGUILayout.TextField("Goal Name", objectiveName, GUILayout.Width(332)); player = (GameObject)EditorGUILayout.ObjectField("Player", player, typeof(GameObject), true, GUILayout.Width(350)); GUILayout.Space(30); ObjectiveEditor.MyParent = (Transform)EditorGUILayout.ObjectField("Parent", ObjectiveEditor.MyParent, typeof(Transform), true, GUILayout.Width(350)); GUILayout.BeginHorizontal(); GUILayout.Space(150); if (GUILayout.Button("Create Goal", GUILayout.Width(180), GUILayout.Height(30))) { ObjectiveEditor.CreateGoal(objectiveName, player); objectiveName = string.Empty; player = null; } GUILayout.EndHorizontal(); }
static void DrawMission() { GUIStyle style = new GUIStyle(); style.richText = true; GUILayout.Label("<size=30><b> Mission </b> </size>", style); GUILayout.Space(15); objectiveName = EditorGUILayout.TextField("Mission Name", objectiveName, GUILayout.Width(332)); GUILayout.BeginHorizontal(); GUILayout.Space(150); if (GUILayout.Button("Create Mission", GUILayout.Width(180), GUILayout.Height(30))) { ObjectiveEditor.CreateMission(objectiveName); objectiveName = string.Empty; GUIUtility.keyboardControl = 0; } GUILayout.EndHorizontal(); }
private static void OpenWindow() { ObjectiveEditor window = GetWindow <ObjectiveEditor>(); window.titleContent = new GUIContent("Objective Editor"); }