Exemplo n.º 1
0
 public override bool generateContacts(Collidable other, Contact contact)
 {
     if (other as Box != null)
     {
         return contact.BoxAndBox();
     }
     else if (other as Sphere != null)
     {
         return contact.SphereAndBox();
     }
     return false;
 }
Exemplo n.º 2
0
 public override ContactData generateContacts(Collidable other)
 {
     Contact contact = null;
     contact = new Contact(this, other);
     if (other as Box != null)
     {
         contact.BoxAndBox();
     }
     if (other as Sphere != null)
     {
         contact.SphereAndBox();
     }
     return contact.GetContactData();
 }