EgorkZe Posted November 17, 2014 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? Link to comment Share on other sites More sharing options...
Serapth Posted November 17, 2014 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 Link to comment Share on other sites More sharing options...
Recommended Posts