Skip to content

Commit e35524a

Browse files
committed
Added setCollisionMap method.
1 parent 17c24ef commit e35524a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

v3/src/physics/impact/World.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var Class = require('../../utils/Class');
55
var COLLIDES = require('./COLLIDES');
66
var CollisionMap = require('./CollisionMap');
77
var GetFastValue = require('../../utils/object/GetFastValue');
8-
var GetValue = require('../../utils/object/GetValue');
98
var Set = require('../../structs/Set');
109
var Solver = require('./Solver');
1110
var TYPE = require('./TYPE');
@@ -93,6 +92,13 @@ var World = new Class({
9392
}
9493
},
9594

95+
setCollisionMap: function (tilesize, data)
96+
{
97+
this.collisionMap = new CollisionMap(tilesize, data);
98+
99+
return this;
100+
},
101+
96102
/**
97103
* Sets the bounds of the Physics world to match the given world pixel dimensions.
98104
* You can optionally set which 'walls' to create: left, right, top or bottom.

0 commit comments

Comments
 (0)