public void SendTriggerEnter(BC_TriggerData data)
 {
     if (this.trigEnters != null)
     {
         for (int i = 0; i < this.trigEnters.Count; i++)
         {
             this.trigEnters[i].OnTriggerEnter(data);
             EventListener.TriggerEnter(data);                 // Invoke custom event
         }
     }
 }
예제 #2
0
    void IBC_TriggerEnterListener.OnTriggerEnter(BC_TriggerData other)
    {
        if (this.coolDown > 0f || !this.exited)
        {
            return;
        }
        RoomSwitchable component = other.collider.GetComponent <RoomSwitchable>();

        if (component != null)
        {
            this.coolDown = 20f;
            this.StartFadeout(component);
        }
    }
예제 #3
0
 void IBC_TriggerExitListener.OnTriggerExit(BC_TriggerData other)
 {
     this.exited = true;
 }
예제 #4
0
 public static void TriggerExit(BC_TriggerData data)
 {
     //DebugManager.LogToFile("[OnTriggerExit] " + data.collider.name + " exited collision with " + data.myCollider.name);
     OnTriggerExit?.Invoke(data);
 }
예제 #5
0
 public static void TriggerStay(BC_TriggerData data)
 {
     //DebugManager.LogToFile("[OnTriggerStay] " + data.collider.name + " is  colliding with " + data.myCollider.name);
     OnTriggerStay?.Invoke(data);
 }