private CompoundChild GetChild(CompoundChildData data, int index)
{
var instance = data.Entry.Shape.GetCollidableInstance();
if (data.Events != null)
instance.Events = data.Events;
//Establish the link between the child event manager and our event manager.
instance.events.Parent = Events;
if (data.CollisionRules != null)
instance.CollisionRules = data.CollisionRules;
instance.Tag = data.Tag;
if (data.Material == null)
data.Material = new Material();
return new CompoundChild(Shape, instance, data.Material, index);
}