Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public void init(EntityManager m, GameObject o, UserData d) {
  2.                 /**
  3.                  * Create body
  4.                  */
  5.                 this.b = m.getWorld().createBody(getBodyDef(null));
  6.                
  7.                 /**
  8.                  * Set fixture
  9.                  */
  10.                 EdgeShape shape = new EdgeShape();
  11.                 shape.set(v1, new Vector2(dim.w, dim.h));
  12.                
  13.                 Fixture f = b.createFixture(shape, 70);
  14.                 f.setRestitution(0);
  15.                 b.setUserData(d);
  16.                 b.setSleepingAllowed(true);
  17.                
  18.                 shape.dispose();
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement