8182838485868788899091
bd.position.set(-14.5f + 1.0f * i, 5.0f); Body body = getWorld().createBody(bd); body.createFixture(fd); Vec2 anchor = new Vec2(-15.0f + 1.0f * i, 5.0f); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); prevBody = body; } }
109110111112113114115116117118119
bd.position.set(-14.0f + 2.0f * i, 15.0f); Body body = getWorld().createBody(bd); body.createFixture(fd); Vec2 anchor = new Vec2(-15.0f + 2.0f * i, 15.0f); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); prevBody = body; } }
136137138139140141142143144145146
Body body = getWorld().createBody(bd); body.createFixture(fd); if (i > 0) { Vec2 anchor = new Vec2(-5.0f + 1.0f * i, 5.0f); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); } prevBody = body; }
166167168169170171172173174175176
Body body = getWorld().createBody(bd); body.createFixture(fd); if (i > 0) { Vec2 anchor = new Vec2(5.0f + 1.0f * i, 10.0f); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); } prevBody = body; }