EgorkZe Posted November 17, 2014 Report Share Posted November 17, 2014 With javascript i do it such way: body.onBeginContact.add(method,this); function method(body, shapeA, shapeB, equation){ .....} How can i do it with TypeScript? Quote Link to comment Share on other sites More sharing options...
Serapth Posted November 17, 2014 Report Share Posted November 17, 2014 Pretty much the same way, except you may have to qualify the method if you are in a module or class. ( as in, body.onBeginContact(MyClassName.prototype.method,this) ) EgorkZe 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.