/// <summary>
 /// On enter, enables the camera and triggers the enter event
 /// </summary>
 /// <param name="collider"></param>
 protected virtual void OnTriggerEnter(Collider collider)
 {
     if (TriggerMask.MMContains(collider.gameObject))
     {
         StartCoroutine(EnableCamera(true, 0));
         OnEnterZoneEvent.Invoke();
     }
 }
Beispiel #2
0
 /// <summary>
 /// On exit, disables the camera and invokes the exit event
 /// </summary>
 /// <param name="collider"></param>
 protected virtual void OnTriggerExit2D(Collider2D collider)
 {
     if (TriggerMask.MMContains(collider.gameObject))
     {
         StartCoroutine(EnableCamera(false, 0));
         OnExitZoneEvent.Invoke();
     }
 }