Example #1
0
 private void OnTriggerEntered(AreaTrigger2DEvent arg)
 {
     if (arg.Collider.tag == "Player")
     {
         Entered.InvokeSafe(this);
         _playerInArea = true;
     }
 }
Example #2
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     Entered.InvokeSafe(new CollisionListener2DEvent(this, collision));
 }
 private void OnTriggerEnter2D(Collider2D collider)
 {
     Entered.InvokeSafe(new AreaTrigger2DEvent(this, collider));
 }