Skip to content

Commit

Permalink
updates demo to show off mask bits
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Nov 30, 2019
1 parent c4bbcbe commit 6b7e30c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions agsbox2d_demo/room4.asc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Physical box3;
Physical box4;

Physical ball2;
Physical ball3;

Body*[] setWalls(World* wrld) {
Body* _w[];
Expand Down Expand Up @@ -95,6 +96,16 @@ function room_Load()
ball2.shape = AgsBox2D.CreateCircleShape(12.0);
ball2.fixture = AgsBox2D.CreateFixture(ball2.body, ball2.shape, 1.0);
ball2.fixture.Restitution = 0.5;
ball2.fixture.CategoryBits = 2;
ball2.fixture.MaskBits = 65535-4;

ball3.body = AgsBox2D.CreateBody(world, 40.0, 30.0, eBodyDynamic);
ball3.body.FixedRotation = false;
ball3.shape = AgsBox2D.CreateCircleShape(14.0);
ball3.fixture = AgsBox2D.CreateFixture(ball3.body, ball3.shape, 2.0);
ball3.fixture.Restitution = 0.7;
ball3.fixture.CategoryBits = 4;
ball3.fixture.MaskBits = 65535-2;

}

Expand Down
Binary file modified agsbox2d_demo/room4.crm
Binary file not shown.

0 comments on commit 6b7e30c

Please sign in to comment.