Beispiel #1
0
 private void Collider_Destroyed(MyBoxCollider2D collider)
 {
     collider.Destroyed -= Collider_Destroyed;
     _colliders.Remove(collider);
 }
Beispiel #2
0
 public MyBoxCollider2D[] GetIntersections(MyBoxCollider2D collider)
 {
     return(_colliders.Except(collider).Where(c => c.enabled && c.Bounds.Intersects(collider.Bounds)).ToArray());
 }
Beispiel #3
0
 public void Register(MyBoxCollider2D collider)
 {
     _colliders.Add(collider);
     collider.Destroyed += Collider_Destroyed;
 }