Example #1
0
 void OnTriggerExit(Collider c)
 {
     if (!IsPlayer(c))
     {
         return;
     }
     PlayerLeave.Invoke();
     // StopCoroutine("PlayerStayCaster");
     StopAllCoroutines();
     SendMessage(PlayerLeaveMessage, c, SendMessageOptions.DontRequireReceiver);
 }
Example #2
0
 void OnTriggerEnter(Collider c)
 {
     if (!IsPlayer(c))
     {
         return;
     }
     PlayerDetected.Invoke();
     //StartCoroutine("PlayerStayCaster",c); doesn't work...?
     StartCoroutine(PlayerStayCaster(c));
     SendMessage(PlayerEnterMessage, c, SendMessageOptions.DontRequireReceiver);
 }
Example #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     playerDetectedEvent.Invoke();
 }