Ejemplo n.º 1
0
        void actorElement_ContactEnded(ContactInfo contact, RigidBody sourceBody, RigidBody otherBody, bool isBodyA)
        {
            TopTooth otherTooth = otherBody.Owner.getElement("Behavior") as TopTooth;

            if (otherTooth != null)
            {
                collidingTeeth.Remove(otherTooth);
            }
            else
            {
                Splint splint = otherBody.Owner.getElement(Splint.SplintBehaviorName) as Splint;
                if (splint != null)
                {
                    collidingSplints.Remove(splint);
                }
            }
        }
Ejemplo n.º 2
0
 void actorElement_ContactStarted(ContactInfo contact, RigidBody sourceBody, RigidBody otherBody, bool isBodyA)
 {
     if (otherBody != null)
     {
         BottomTooth otherTooth = otherBody.Owner.getElement("Behavior") as BottomTooth;
         if (otherTooth != null)
         {
             collidingTeeth.Add(otherTooth);
         }
         else
         {
             Splint splint = otherBody.Owner.getElement(Splint.SplintBehaviorName) as Splint;
             if (splint != null)
             {
                 collidingSplints.Add(splint);
             }
         }
     }
 }