mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
changed function( to function (
This commit is contained in:
parent
26f3d22db7
commit
7e5eeb0a27
36 changed files with 209 additions and 209 deletions
|
|
@ -4,7 +4,7 @@ define([
|
|||
"Game/Core/Collision/Detector"
|
||||
],
|
||||
|
||||
function(Settings, Box2D, CollisionDetector) {
|
||||
function (Settings, Box2D, CollisionDetector) {
|
||||
|
||||
function Engine () {
|
||||
this.world = new Box2D.Dynamics.b2World(
|
||||
|
|
@ -13,21 +13,21 @@ function(Settings, Box2D, CollisionDetector) {
|
|||
);
|
||||
}
|
||||
|
||||
Engine.prototype.getWorld = function() {
|
||||
Engine.prototype.getWorld = function () {
|
||||
return this.world;
|
||||
}
|
||||
|
||||
Engine.prototype.setCollisionDetector = function(me) {
|
||||
Engine.prototype.setCollisionDetector = function (me) {
|
||||
|
||||
var detector = new CollisionDetector(me); // FIXME: check if core collision detector works
|
||||
this.world.SetContactListener(detector.getListener());
|
||||
}
|
||||
|
||||
Engine.prototype.createBody = function(bodyDef) {
|
||||
Engine.prototype.createBody = function (bodyDef) {
|
||||
return this.world.CreateBody(bodyDef);
|
||||
}
|
||||
|
||||
Engine.prototype.update = function() {
|
||||
Engine.prototype.update = function () {
|
||||
this.world.Step(Settings.BOX2D_TIME_STEP, Settings.BOX2D_VELOCITY_ITERATIONS, Settings.BOX2D_POSITION_ITERATIONS);
|
||||
this.world.ClearForces();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue