Пример #1
0
 protected virtual void OnCollisionOccurrence(CollisionOccurrenceEventArgs e)
 {
     if (CollisionOccurrence != null)
     {
         CollisionOccurrence(this, e);//Raise the event
     }
 }
Пример #2
0
 // On collision, raise event
 public void didCollide()
 {
     if (Collision == true)
     {
         CollisionOccurrenceEventArgs e = new CollisionOccurrenceEventArgs(_collision);
         OnCollisionOccurrence(e);
     }
 }