상속: Joint
예제 #1
0
파일: Joint.cs 프로젝트: litdev1/LitDev
 internal static Joint Create(JointDef def)
 {
     Joint result = null;
     switch (def.Type)
     {
         case JointType.RevoluteJoint:
         {
             result = new RevoluteJoint((RevoluteJointDef)def);
             break;
         }
         case JointType.PrismaticJoint:
         {
             result = new PrismaticJoint((PrismaticJointDef)def);
             break;
         }
         case JointType.DistanceJoint:
         {
             result = new DistanceJoint((DistanceJointDef)def);
             break;
         }
         case JointType.PulleyJoint:
         {
             result = new PulleyJoint((PulleyJointDef)def);
             break;
         }
         case JointType.MouseJoint:
         {
             result = new MouseJoint((MouseJointDef)def);
             break;
         }
         case JointType.GearJoint:
         {
             result = new GearJoint((GearJointDef)def);
             break;
         }
         case JointType.LineJoint:
         {
             result = new LineJoint((LineJointDef)def);
             break;
         }
         default:
         {
             Box2DXDebug.Assert(false);
             break;
         }
     }
     return result;
 }