mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
Added setCollisionMap method.
This commit is contained in:
parent
17c24ef586
commit
e35524a1f5
1 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,6 @@ var Class = require('../../utils/Class');
|
|||
var COLLIDES = require('./COLLIDES');
|
||||
var CollisionMap = require('./CollisionMap');
|
||||
var GetFastValue = require('../../utils/object/GetFastValue');
|
||||
var GetValue = require('../../utils/object/GetValue');
|
||||
var Set = require('../../structs/Set');
|
||||
var Solver = require('./Solver');
|
||||
var TYPE = require('./TYPE');
|
||||
|
@ -93,6 +92,13 @@ var World = new Class({
|
|||
}
|
||||
},
|
||||
|
||||
setCollisionMap: function (tilesize, data)
|
||||
{
|
||||
this.collisionMap = new CollisionMap(tilesize, data);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the bounds of the Physics world to match the given world pixel dimensions.
|
||||
* You can optionally set which 'walls' to create: left, right, top or bottom.
|
||||
|
|
Loading…
Reference in a new issue