Exemple #1
0
        private static void DrawGizmo(EventTrigger src, GizmoType gizmoType)
        {
            if (!InternalEditorUtility.GetIsInspectorExpanded(src))
            {
                return;
            }

            if (!Trigger.ShowLines)
            {
                return;
            }

            UtilsEditor.DrawEventLine(src.transform, src.OnTrigger);
        }
        private static void DrawGizmo(ActivationTrigger src, GizmoType gizmoType)
        {
            if (!InternalEditorUtility.GetIsInspectorExpanded(src))
            {
                return;
            }

            if (!Trigger.ShowLines)
            {
                return;
            }

            foreach (GameObject go in src.Objects)
            {
                if (go != null)
                {
                    UtilsEditor.DrawArrowLine(src.transform.position, go.transform.position);
                }
            }
        }
        private static void DrawGizmo(UniversalTrigger src, GizmoType gizmoType)
        {
            if (!InternalEditorUtility.GetIsInspectorExpanded(src))
            {
                return;
            }

            if (!Trigger.ShowLines)
            {
                return;
            }

            if (src.ActuationMode == UniversalTrigger.ActuationModes.Basic)
            {
                foreach (Trigger trigger in src.BasicActuator.Triggers)
                {
                    if (trigger != null)
                    {
                        UtilsEditor.DrawArrowLine(src.transform.position, trigger.transform.position);
                    }
                }

                UtilsEditor.DrawEventLine(src.transform, src.BasicActuator.OnTrigger);
            }
            else
            {
                foreach (UniversalTrigger.Actuator state in src.SwitchStates)
                {
                    foreach (Trigger trigger in state.Triggers)
                    {
                        if (trigger != null)
                        {
                            UtilsEditor.DrawArrowLine(src.transform.position, trigger.transform.position);
                        }
                    }

                    UtilsEditor.DrawEventLine(src.transform, state.OnTrigger);
                }
            }
        }
Exemple #4
0
        private static void DrawGizmo(InteractionTrigger src, GizmoType gizmoType)
        {
            if (!InternalEditorUtility.GetIsInspectorExpanded(src))
            {
                return;
            }

            if (!Trigger.ShowLines)
            {
                return;
            }

            foreach (Trigger trigger in src.Triggers)
            {
                if (trigger != null)
                {
                    UtilsEditor.DrawArrowLine(src.transform.position, trigger.transform.position);
                }
            }

            UtilsEditor.DrawEventLine(src.transform, src.OnInteract);
        }