예제 #1
0
 // Use this for initialization
 protected override IntPtr Init()
 {
     Vector3 posA = transform.position + archorA;
     Vector3 posB = transform.position + archorB;
     RopeJointDef jd = new RopeJointDef(other.body, body.body);
     jd.localAnchorA = new Vector2(posA.x, posA.y);
     jd.localAnchorB = new Vector2(posB.x, posB.y);
     jd.maxLength = maxLength;
     return API.CreateRopeJoint( B2DWorld.instance.world, jd );
 }
예제 #2
0
 public static extern IntPtr CreateRopeJoint( IntPtr w, RopeJointDef def );
예제 #3
0
 public static extern IntPtr CreateRopeJoint(IntPtr w, RopeJointDef def);