Beispiel #1
0
    protected void OnEnable()
    {
        source    = (EngineEventTriggerManager)target;
        sourceRef = serializedObject;

        GetProperties();
    }
Beispiel #2
0
 static void DrawConnections(EngineEventTriggerManager _manager, GizmoType gizmoType)
 {
     for (int trigInd = 0; trigInd < _manager.Triggers.Length; trigInd++)
     {
         var receivers = _manager.Triggers[trigInd].Receivers;
         for (int recInd = 0; recInd < receivers.Length; recInd++)
         {
             var receiver = receivers[recInd].Manager;
             if (receiver)
             {
                 var pos  = _manager.transform.position;
                 var dest = receiver.transform.position;
                 EditorExtensions.DrawArrowedLine(pos, dest, 2, 0.05f, Color.blue, Color.green);
             }
         }
     }
 }
Beispiel #3
0
    public void Activate(EngineEventTriggerManager _manager, int _triggerIndex)
    {
        manager    = _manager;
        triggerInd = _triggerIndex;

        if (triggerType == TriggerType.External)
        {
            return;
        }
        else if (triggerType == TriggerType.OnEnter)
        {
            _manager.DetectZones[detectZoneInd].AddEnterTrigger(_manager, OnEnter);
        }
        else if (triggerType == TriggerType.OnStay)
        {
            _manager.DetectZones[detectZoneInd].AddStayTrigger(_manager, OnStay);
        }
        else if (triggerType == TriggerType.OnExit)
        {
            _manager.DetectZones[detectZoneInd].AddExitTrigger(_manager, OnExit);
        }
    }
 public void SetManager(EngineEventTriggerManager _manager)
 {
     manager = _manager;
 }