private void DrawCondition(Rect pos, TriggerCondition condition, GUIContent label) { EditorGUI.LabelField(InLine.GetRect(pos, 0, 0, 2), "Trigger"); condition.referenceTrigger = (Trigger)EditorGUI.ObjectField(InLine.GetRect(pos, 0, 100, 1), condition.referenceTrigger, typeof(Trigger), true); InLine.SetRect(pos, 1, 0, 6); { EditorGUI.LabelField(InLine.NextRect(), "IsTrue"); condition.isTrue = EditorGUI.Toggle(InLine.NextRect(true), condition.isTrue); } }
protected void DrawCondition(Rect pos, DestroyedCondition condition, GUIContent label) { EditorGUI.LabelField(InLine.GetRect(pos, 0, 0, 2), "Object"); condition.checkObject = EditorGUI.ObjectField(InLine.GetRect(pos, 0, 100, 1), condition.checkObject, typeof(UnityEngine.Object), true); InLine.SetRect(pos, 1, 0, 6); { EditorGUI.LabelField(InLine.NextRect(), "IsAlive"); condition.isAlive = EditorGUI.Toggle(InLine.NextRect(true), condition.isAlive); } InLine.Reset(); }
protected void DrawCondition(Rect pos, TimedCondition condition, GUIContent label) { EditorGUI.LabelField(InLine.GetRect(pos, 0, 0, 2), "Timer Amount"); condition.timerAmount = EditorGUI.FloatField(InLine.GetRect(pos, 0, 100, 1), condition.timerAmount); InLine.SetRect(pos, 1, 0, 6); { EditorGUI.LabelField(InLine.NextRect(), "Loop"); condition.loop = EditorGUI.Toggle(InLine.NextRect(true), condition.loop); } InLine.Reset(); }
private void DrawCondition(Rect pos, InputCondition condition, GUIContent label) { InLine.SetRect(pos, 0, 0, 3); { EditorGUI.LabelField(InLine.NextRect(), "Button"); condition.button = EditorGUI.TextField(InLine.NextRect(), condition.button); } InLine.SetRect(pos, 1, 0, 3); { EditorGUI.LabelField(InLine.NextRect(), "InputType"); condition.type = (InputType)EditorGUI.EnumPopup(InLine.NextRect(), condition.type); } }
protected void DrawCondition(Rect pos, AmountCondition condition, GUIContent label) { InLine.SetRect(pos, 0, 0, 6); { condition.typeOfFind = (FindType)EditorGUI.EnumPopup(InLine.NextRect(), condition.typeOfFind); switch (condition.typeOfFind) { case FindType.Tag: condition.checkTag = EditorGUI.TagField(InLine.NextRect(), condition.checkTag); break; case FindType.Layer: condition.layer = EditorGUI.MaskField(InLine.NextRect(), condition.layer, FindLayerNames()); break; case FindType.ByType: condition.typeTemplate = EditorGUI.ObjectField(InLine.NextRect(), condition.typeTemplate, typeof(UnityEngine.Object), true); if (condition.typeTemplate == null) { EditorGUILayout.HelpBox("A Amount Condition needs a type template", MessageType.Warning); } break; } EditorGUI.LabelField(InLine.GetLine(0, pos.width / 3, 5f), "Current", GUIStyle.none); EditorGUI.IntField(InLine.NextRect(), condition.numOfObjects, GUIStyle.none); } InLine.SetRect(pos, 1, 0, 6); { EditorGUI.LabelField(InLine.NextRect(), "Remaining"); condition.typeOfCompare = (CompareType)EditorGUI.EnumPopup(InLine.NextRect(), condition.typeOfCompare); condition.amount = EditorGUI.IntField(InLine.NextRect(), condition.amount); } condition.triggerArea = EditorGUI.BoundsField(InLine.GetLine(0, pos.width / 2, 1), condition.triggerArea); InLine.Reset(); }
protected void DrawCondition(Rect pos, AreaCondition condition, GUIContent label) { InLine.SetRect(pos, 0, 0, 6); { EditorGUI.LabelField(InLine.NextRect(), "Area"); } condition.triggerArea = EditorGUI.BoundsField(InLine.GetLine(0, pos.width / 2, 1), condition.triggerArea); InLine.SetRect(pos, 0, 50, 6); { EditorGUI.LabelField(InLine.NextRect(), "UsePlayer"); condition.UsePlayer = EditorGUI.Toggle(InLine.NextRect(true), condition.UsePlayer); } if (!condition.UsePlayer) { condition.checkObject = (GameObject)EditorGUI.ObjectField(InLine.GetLine(1, 0, 2), condition.checkObject, typeof(GameObject), true); if (!condition.checkObject) { EditorGUILayout.HelpBox("CheckObject is null for AreaCondition", MessageType.Warning); } } InLine.Reset(); }