diff --git a/README.md b/README.md index d8351756..d7764c7a 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Bug Fixes: * Fixed easing tween example case. Issue #379 (thanks wesleywerner) * Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills) * Removed inContact check from Body.separate. +* Fixed Tilemap docs (wrongly pointed to Tileset methods) See the full Change Log for all the 1.1.4 updates and API changes (as there were a lot of them!) diff --git a/build/phaser.js b/build/phaser.js index 0d47d086..4b6ad76a 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -18,7 +18,7 @@ * * Phaser - http://www.phaser.io * -* v1.1.5 - Built at: Wed Feb 12 2014 15:20:51 +* v1.1.5 - Built at: Wed Feb 12 2014 15:32:36 * * By Richard Davey http://www.photonstorm.com @photonstorm * @@ -43097,14 +43097,49 @@ Phaser.Tilemap = function (game, key) { return; } + /** + * @property {number} width - The width of the map (in tiles). + */ this.width = data.width; + + /** + * @property {number} height - The height of the map (in tiles). + */ this.height = data.height; + + /** + * @property {number} tileWidth - The base width of the tiles in the map (in pixels). + */ this.tileWidth = data.tileWidth; + + /** + * @property {number} tileHeight - The base height of the tiles in the map (in pixels). + */ this.tileHeight = data.tileHeight; + + /** + * @property {string} orientation - The orientation of the map data (as specified in Tiled), usually 'orthogonal'. + */ this.orientation = data.orientation; + + /** + * @property {number} version - The version of the map data (as specified in Tiled, usually 1). + */ this.version = data.version; + + /** + * @property {object} properties - Map specific properties as specified in Tiled. + */ this.properties = data.properties; + + /** + * @property {number} widthInPixels - The width of the map in pixels based on width * tileWidth. + */ this.widthInPixels = data.widthInPixels; + + /** + * @property {number} heightInPixels - The height of the map in pixels based on height * tileHeight. + */ this.heightInPixels = data.heightInPixels; /** @@ -43149,13 +43184,13 @@ Phaser.Tilemap = function (game, key) { this._results = []; /** - * @property {number} _tempA - Internal var. + * @property {number} _tempA - Internal cache var. * @private */ this._tempA = 0; /** - * @property {number} _tempB - Internal var. + * @property {number} _tempB - Internal cache var. * @private */ this._tempB = 0; @@ -43210,7 +43245,7 @@ Phaser.Tilemap.prototype = { format: Phaser.Tilemap.CSV, data: data, indexes: [], - dirty: true + dirty: true }); @@ -43256,12 +43291,13 @@ Phaser.Tilemap.prototype = { }, - // Region? Remove tile from map data? + /* createFromTiles: function (layer, tileIndex, key, frame, group) { if (typeof group === 'undefined') { group = this.game.world; } }, + */ /** * Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is @@ -43269,7 +43305,7 @@ Phaser.Tilemap.prototype = { * configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the * Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically. * - * @method Phaser.Tileset#createFromObjects + * @method Phaser.Tilemap#createFromObjects * @param {string} name - The name of the Object Group to create Sprites from. * @param {number} gid - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {string} key - The Game.cache key of the image that this Sprite will use. @@ -43314,8 +43350,10 @@ Phaser.Tilemap.prototype = { /** * Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. + * The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. + * Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. * - * @method Phaser.Tileset#createLayer + * @method Phaser.Tilemap#createLayer * @param {number|string} layer - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {number} [width] - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. * @param {number} [height] - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. @@ -43350,7 +43388,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on the layers name. * - * @method Phaser.Tileset#getIndex + * @method Phaser.Tilemap#getIndex * @protected * @param {array} location - The local array to search. * @param {string} name - The name of the array element to get. @@ -43373,7 +43411,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on its name. * - * @method Phaser.Tileset#getLayerIndex + * @method Phaser.Tilemap#getLayerIndex * @param {string} name - The name of the layer to get. * @return {number} The index of the layer in this tilemap, or null if not found. */ @@ -43386,7 +43424,7 @@ Phaser.Tilemap.prototype = { /** * Gets the tileset index based on its name. * - * @method Phaser.Tileset#getTilesetIndex + * @method Phaser.Tilemap#getTilesetIndex * @param {string} name - The name of the tileset to get. * @return {number} The index of the tileset in this tilemap, or null if not found. */ @@ -43399,7 +43437,7 @@ Phaser.Tilemap.prototype = { /** * Gets the image index based on its name. * - * @method Phaser.Tileset#getImageIndex + * @method Phaser.Tilemap#getImageIndex * @param {string} name - The name of the image to get. * @return {number} The index of the image in this tilemap, or null if not found. */ @@ -43412,7 +43450,7 @@ Phaser.Tilemap.prototype = { /** * Gets the object index based on its name. * - * @method Phaser.Tileset#getObjectIndex + * @method Phaser.Tilemap#getObjectIndex * @param {string} name - The name of the object to get. * @return {number} The index of the object in this tilemap, or null if not found. */ @@ -43427,7 +43465,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileIndexCallback + * @method Phaser.Tilemap#setTileIndexCallback * @param {number|array} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. * @param {function} callback - The callback that will be invoked when the tile is collided with. * @param {object} callbackContext - The context under which the callback is called. @@ -43458,7 +43496,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileLocationCallback + * @method Phaser.Tilemap#setTileLocationCallback * @param {number} x - X position of the top left of the area to copy (given in tiles, not pixels) * @param {number} y - Y position of the top left of the area to copy (given in tiles, not pixels) * @param {number} width - The width of the area to copy (given in tiles, not pixels) @@ -43489,7 +43527,7 @@ Phaser.Tilemap.prototype = { * Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollision + * @method Phaser.Tilemap#setCollision * @param {number|array} indexes - Either a single tile index, or an array of tile IDs to be checked for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -43523,7 +43561,7 @@ Phaser.Tilemap.prototype = { * Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionBetween + * @method Phaser.Tilemap#setCollisionBetween * @param {number} start - The first index of the tile to be set for collision. * @param {number} stop - The last index of the tile to be set for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. @@ -43554,7 +43592,7 @@ Phaser.Tilemap.prototype = { * Sets collision on all tiles in the given layer, except for the IDs of those in the given array. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionByExclusion + * @method Phaser.Tilemap#setCollisionByExclusion * @param {array} indexes - An array of the tile IDs to not be counted for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -43583,7 +43621,7 @@ Phaser.Tilemap.prototype = { * Sets collision values on a tile in the set. * You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion. * - * @method Phaser.Tileset#setCollisionByIndex + * @method Phaser.Tilemap#setCollisionByIndex * @protected * @param {number} index - The index of the tile on the layer. * @param {boolean} [collides=true] - If true it will enable collision on the tile. If false it will clear collision values from the tile. @@ -43626,7 +43664,7 @@ Phaser.Tilemap.prototype = { /** * Gets the TilemapLayer index as used in the setCollision calls. * - * @method Phaser.Tileset#getLayer + * @method Phaser.Tilemap#getLayer * @protected * @param {number|string|Phaser.TilemapLayer} layer - The layer to operate on. If not given will default to this.currentLayer. * @return {number} The TilemapLayer index. @@ -43657,7 +43695,7 @@ Phaser.Tilemap.prototype = { /** * Internal function. * - * @method Phaser.Tileset#calculateFaces + * @method Phaser.Tilemap#calculateFaces * @protected * @param {number} layer - The index of the TilemapLayer to operate on. */ @@ -43714,7 +43752,7 @@ Phaser.Tilemap.prototype = { * Gets the tile above the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileAbove + * @method Phaser.Tilemap#getTileAbove * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -43734,7 +43772,7 @@ Phaser.Tilemap.prototype = { * Gets the tile below the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileBelow + * @method Phaser.Tilemap#getTileBelow * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -43754,7 +43792,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the left of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileLeft + * @method Phaser.Tilemap#getTileLeft * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -43774,7 +43812,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the right of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileRight + * @method Phaser.Tilemap#getTileRight * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -43831,7 +43869,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[y][x].index = tile; } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); } @@ -43991,7 +44029,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[ diffY + tileblock[i].y ][ diffX + tileblock[i].x ].copy(tileblock[i]); } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); }, diff --git a/build/phaser.min.js b/build/phaser.min.js index 123d53e4..e5c87920 100644 --- a/build/phaser.min.js +++ b/build/phaser.min.js @@ -10,4 +10,4 @@ },repeat:function(a,b,c,d){return this.create(a,!1,b,c,d,Array.prototype.splice.call(arguments,4))},loop:function(a,b,c){return this.create(a,!0,0,b,c,Array.prototype.splice.call(arguments,3))},start:function(){this._started=this.game.time.now,this.running=!0},stop:function(){this.running=!1,this.events.length=0},remove:function(a){for(var b=0;b0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(a,b){return a.tickb.tick?1:0},update:function(a){if(this.paused)return!0;for(this._now=a-this._started,this._len=this.events.length,this._i=0;this._i=this.nextTick&&this._len>0){for(this._i=0;this._i=this.events[this._i].tick;)this.events[this._i].loop===!0?(this.events[this._i].tick+=this.events[this._i].delay-(this._now-this.events[this._i].tick),this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):this.events[this._i].repeatCount>0?(this.events[this._i].repeatCount--,this.events[this._i].tick+=this.events[this._i].delay-(this._now-this.events[this._i].tick),this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):(this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args),this.events.splice(this._i,1),this._len--),this._i++;this.events.length>0?this.order():(this.expired=!0,this.onComplete.dispatch(this))}return this.expired&&this.autoDestroy?!1:!0},pause:function(){this.running&&!this.expired&&(this._pauseStarted=this.game.time.now,this.paused=!0)},resume:function(){if(this.running&&!this.expired){for(var a=this.game.time.now-this._pauseStarted,b=0;bthis._now?this.nextTick-this._now:0}}),Object.defineProperty(c.Timer.prototype,"length",{get:function(){return this.events.length}}),Object.defineProperty(c.Timer.prototype,"ms",{get:function(){return this._now}}),Object.defineProperty(c.Timer.prototype,"seconds",{get:function(){return.001*this._now}}),c.Timer.prototype.constructor=c.Timer,c.TimerEvent=function(a,b,c,d,e,f,g,h){this.timer=a,this.delay=b,this.tick=c,this.repeatCount=d-1,this.loop=e,this.callback=f,this.callbackContext=g,this.args=h,this.pendingDelete=!1},c.TimerEvent.prototype.constructor=c.TimerEvent,c.AnimationManager=function(a){this.sprite=a,this.game=a.game,this.currentFrame=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},c.AnimationManager.prototype={loadFrameData:function(a){this._frameData=a,this.frame=0,this.isLoaded=!0},add:function(a,d,e,f,g){return null==this._frameData?(console.warn("No FrameData available for Phaser.Animation "+a),void 0):(e=e||60,"undefined"==typeof f&&(f=!1),"undefined"==typeof g&&(g=d&&"number"==typeof d[0]?!0:!1),null==this.sprite.events.onAnimationStart&&(this.sprite.events.onAnimationStart=new c.Signal,this.sprite.events.onAnimationComplete=new c.Signal,this.sprite.events.onAnimationLoop=new c.Signal),this._outputFrames.length=0,this._frameData.getFrameIndexes(d,g,this._outputFrames),this._anims[a]=new c.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,e,f),this.currentAnim=this._anims[a],this.currentFrame=this.currentAnim.currentFrame,this.sprite.setTexture(b.TextureCache[this.currentFrame.uuid]),this._anims[a])},validateFrames:function(a,b){"undefined"==typeof b&&(b=!0);for(var c=0;cthis._frameData.total)return!1}else if(this._frameData.checkFrameName(a[c])===!1)return!1;return!0},play:function(a,b,c,d){if(this._anims[a]){if(this.currentAnim!=this._anims[a])return this.currentAnim=this._anims[a],this.currentAnim.paused=!1,this.currentAnim.play(b,c,d);if(this.currentAnim.isPlaying===!1)return this.currentAnim.paused=!1,this.currentAnim.play(b,c,d)}},stop:function(a,b){"undefined"==typeof b&&(b=!1),"string"==typeof a?this._anims[a]&&(this.currentAnim=this._anims[a],this.currentAnim.stop(b)):this.currentAnim&&this.currentAnim.stop(b)},update:function(){return this.updateIfVisible&&this.sprite.visible===!1?!1:this.currentAnim&&this.currentAnim.update()===!0?(this.currentFrame=this.currentAnim.currentFrame,this.sprite.currentFrame=this.currentFrame,!0):!1},getAnimation:function(a){return"string"==typeof a&&this._anims[a]?this._anims[a]:null},refreshFrame:function(){this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(b.TextureCache[this.currentFrame.uuid])},destroy:function(){this._anims={},this._frameData=null,this._frameIndex=0,this.currentAnim=null,this.currentFrame=null}},c.AnimationManager.prototype.constructor=c.AnimationManager,Object.defineProperty(c.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(c.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData?this._frameData.total:-1}}),Object.defineProperty(c.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(c.AnimationManager.prototype,"frame",{get:function(){return this.currentFrame?this._frameIndex:void 0},set:function(a){"number"==typeof a&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this._frameIndex=a,this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(b.TextureCache[this.currentFrame.uuid]))}}),Object.defineProperty(c.AnimationManager.prototype,"frameName",{get:function(){return this.currentFrame?this.currentFrame.name:void 0},set:function(a){"string"==typeof a&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this._frameIndex=this.currentFrame.index,this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(b.TextureCache[this.currentFrame.uuid])):console.warn("Cannot set frameName: "+a)}}),c.Animation=function(a,b,c,d,e,f,g){this.game=a,this._parent=b,this._frameData=d,this.name=c,this._frames=[],this._frames=this._frames.concat(e),this.delay=1e3/f,this.looped=g,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},c.Animation.prototype={play:function(a,c,d){return"number"==typeof a&&(this.delay=1e3/a),"boolean"==typeof c&&(this.looped=c),"undefined"!=typeof d&&(this.killOnComplete=d),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this._timeLastFrame=this.game.time.now,this._timeNextFrame=this.game.time.now+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setTexture(b.TextureCache[this.currentFrame.uuid]),this._parent.events&&this._parent.events.onAnimationStart.dispatch(this._parent,this),this},restart:function(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this._timeLastFrame=this.game.time.now,this._timeNextFrame=this.game.time.now+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},stop:function(a){"undefined"==typeof a&&(a=!1),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,a&&(this.currentFrame=this._frameData.getFrame(this._frames[0]))},update:function(){return this.isPaused?!1:this.isPlaying===!0&&this.game.time.now>=this._timeNextFrame?(this._frameSkip=1,this._frameDiff=this.game.time.now-this._timeNextFrame,this._timeLastFrame=this.game.time.now,this._frameDiff>this.delay&&(this._frameSkip=Math.floor(this._frameDiff/this.delay),this._frameDiff-=this._frameSkip*this.delay),this._timeNextFrame=this.game.time.now+(this.delay-this._frameDiff),this._frameIndex+=this._frameSkip,this._frameIndex>=this._frames.length?this.looped?(this._frameIndex%=this._frames.length,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setTexture(b.TextureCache[this.currentFrame.uuid]),this._parent.events.onAnimationLoop.dispatch(this._parent,this)):this.onComplete():(this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setTexture(b.TextureCache[this.currentFrame.uuid])),!0):!1},destroy:function(){this.game=null,this._parent=null,this._frames=null,this._frameData=null,this.currentFrame=null,this.isPlaying=!1},onComplete:function(){this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this._parent.events&&this._parent.events.onAnimationComplete.dispatch(this._parent,this),this.killOnComplete&&this._parent.kill()}},c.Animation.prototype.constructor=c.Animation,Object.defineProperty(c.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(a){this.isPaused=a,a?this._pauseStartTime=this.game.time.now:this.isPlaying&&(this._timeNextFrame=this.game.time.now+this.delay)}}),Object.defineProperty(c.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(c.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(a){this.currentFrame=this._frameData.getFrame(a),null!==this.currentFrame&&(this._frameIndex=a,this._parent.setTexture(b.TextureCache[this.currentFrame.uuid]))}}),c.Animation.generateFrameNames=function(a,b,d,e,f){"undefined"==typeof e&&(e="");var g=[],h="";if(d>b)for(var i=b;d>=i;i++)h="number"==typeof f?c.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+e,g.push(h);else for(var i=b;i>=d;i--)h="number"==typeof f?c.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+e,g.push(h);return g},c.Frame=function(a,b,d,e,f,g,h){this.index=a,this.x=b,this.y=d,this.width=e,this.height=f,this.name=g,this.uuid=h,this.centerX=Math.floor(e/2),this.centerY=Math.floor(f/2),this.distance=c.Math.distance(0,0,e,f),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=e,this.sourceSizeH=f,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0},c.Frame.prototype={setTrim:function(a,b,c,d,e,f,g){this.trimmed=a,a&&(this.width=b,this.height=c,this.sourceSizeW=b,this.sourceSizeH=c,this.centerX=Math.floor(b/2),this.centerY=Math.floor(c/2),this.spriteSourceSizeX=d,this.spriteSourceSizeY=e,this.spriteSourceSizeW=f,this.spriteSourceSizeH=g)}},c.Frame.prototype.constructor=c.Frame,c.FrameData=function(){this._frames=[],this._frameNames=[]},c.FrameData.prototype={addFrame:function(a){return a.index=this._frames.length,this._frames.push(a),""!==a.name&&(this._frameNames[a.name]=a.index),a},getFrame:function(a){return this._frames.length>a?this._frames[a]:null},getFrameByName:function(a){return"number"==typeof this._frameNames[a]?this._frames[this._frameNames[a]]:null},checkFrameName:function(a){return null==this._frameNames[a]?!1:!0},getFrameRange:function(a,b,c){"undefined"==typeof c&&(c=[]);for(var d=a;b>=d;d++)c.push(this._frames[d]);return c},getFrames:function(a,b,c){if("undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=[]),"undefined"==typeof a||0===a.length)for(var d=0;dd;d++)b?c.push(this.getFrame(a[d])):c.push(this.getFrameByName(a[d]));return c},getFrameIndexes:function(a,b,c){if("undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=[]),"undefined"==typeof a||0===a.length)for(var d=0,e=this._frames.length;e>d;d++)c.push(this._frames[d].index);else for(var d=0,e=a.length;e>d;d++)b?c.push(a[d]):this.getFrameByName(a[d])&&c.push(this.getFrameByName(a[d]).index);return c}},c.FrameData.prototype.constructor=c.FrameData,Object.defineProperty(c.FrameData.prototype,"total",{get:function(){return this._frames.length}}),c.AnimationParser={spriteSheet:function(a,d,e,f,g,h,i){var j=a.cache.getImage(d);if(null==j)return null;var k=j.width,l=j.height;0>=e&&(e=Math.floor(-k/Math.min(-1,e))),0>=f&&(f=Math.floor(-l/Math.min(-1,f)));var m=Math.round(k/e),n=Math.round(l/f),o=m*n;if(-1!==g&&(o=g),0===k||0===l||e>k||f>l||0===o)return console.warn("Phaser.AnimationParser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight"),null;for(var p=new c.FrameData,q=h,r=h,s=0;o>s;s++){var t=a.rnd.uuid();p.addFrame(new c.Frame(s,q,r,e,f,"",t)),b.TextureCache[t]=new b.Texture(b.BaseTextureCache[d],{x:q,y:r,width:e,height:f}),q+=e+i,q===k&&(q=h,r+=f+i)}return p},JSONData:function(a,d,e){if(!d.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),console.log(d),void 0;for(var f,g=new c.FrameData,h=d.frames,i=0;i tag"),void 0;for(var f,g,h,i,j,k,l,m,n,o,p,q,r=new c.FrameData,s=d.getElementsByTagName("SubTexture"),t=0;t0)for(var c=0;c0)for(var c=0;c0?(this._fileIndex=0,this._progressChunk=100/this._fileList.length,this.loadFile()):(this.progress=100,this.progressFloat=100,this.hasLoaded=!0,this.onLoadComplete.dispatch()))},loadFile:function(){if(!this._fileList[this._fileIndex])return console.warn("Phaser.Loader loadFile invalid index "+this._fileIndex),void 0;var a=this._fileList[this._fileIndex],b=this;switch(a.type){case"image":case"spritesheet":case"textureatlas":case"bitmapfont":a.data=new Image,a.data.name=a.key,a.data.onload=function(){return b.fileComplete(b._fileIndex)},a.data.onerror=function(){return b.fileError(b._fileIndex)},a.data.crossOrigin=this.crossOrigin,a.data.src=this.baseURL+a.url;break;case"audio":a.url=this.getAudioURL(a.url),null!==a.url?this.game.sound.usingWebAudio?(this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="arraybuffer",this._xhr.onload=function(){return b.fileComplete(b._fileIndex)},this._xhr.onerror=function(){return b.fileError(b._fileIndex)},this._xhr.send()):this.game.sound.usingAudioTag&&(this.game.sound.touchLocked?(a.data=new Audio,a.data.name=a.key,a.data.preload="auto",a.data.src=this.baseURL+a.url,this.fileComplete(this._fileIndex)):(a.data=new Audio,a.data.name=a.key,a.data.onerror=function(){return b.fileError(b._fileIndex)},a.data.preload="auto",a.data.src=this.baseURL+a.url,a.data.addEventListener("canplaythrough",c.GAMES[this.game.id].load.fileComplete(this._fileIndex),!1),a.data.load())):this.fileError(this._fileIndex);break;case"tilemap":if(this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="text",a.format===c.Tilemap.TILED_JSON)this._xhr.onload=function(){return b.jsonLoadComplete(b._fileIndex)};else{if(a.format!==c.Tilemap.CSV)throw new Error("Phaser.Loader. Invalid Tilemap format: "+a.format);this._xhr.onload=function(){return b.csvLoadComplete(b._fileIndex)}}this._xhr.onerror=function(){return b.dataLoadError(b._fileIndex)},this._xhr.send();break;case"text":case"script":this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="text",this._xhr.onload=function(){return b.fileComplete(b._fileIndex)},this._xhr.onerror=function(){return b.fileError(b._fileIndex)},this._xhr.send();break;case"binary":this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="arraybuffer",this._xhr.onload=function(){return b.fileComplete(b._fileIndex)},this._xhr.onerror=function(){return b.fileError(b._fileIndex)},this._xhr.send()}},getAudioURL:function(a){var b;"string"==typeof a&&(a=[a]);for(var c=0;c100&&(this.progress=100),null!==this.preloadSprite&&(0===this.preloadSprite.direction?this.preloadSprite.crop.width=Math.floor(this.preloadSprite.width/100*this.progress):this.preloadSprite.crop.height=Math.floor(this.preloadSprite.height/100*this.progress),this.preloadSprite.sprite.crop=this.preloadSprite.crop),this.onFileComplete.dispatch(this.progress,this._fileList[a].key,b,this.totalLoadedFiles(),this._fileList.length),this.totalQueuedFiles()>0?(this._fileIndex++,this.loadFile()):(this.hasLoaded=!0,this.isLoading=!1,this.removeAll(),this.onLoadComplete.dispatch())},totalLoadedFiles:function(){for(var a=0,b=0;b tag"),void 0;var e=b.TextureCache[d],f={},g=c.getElementsByTagName("info")[0],h=c.getElementsByTagName("common")[0];f.font=g.attributes.getNamedItem("face").nodeValue,f.size=parseInt(g.attributes.getNamedItem("size").nodeValue,10),f.lineHeight=parseInt(h.attributes.getNamedItem("lineHeight").nodeValue,10),f.chars={};for(var i=c.getElementsByTagName("char"),j=0;j=this.durationMS&&(this.usingWebAudio?this.loop?(this.onLoop.dispatch(this),""===this.currentMarker?(this.currentTime=0,this.startTime=this.game.time.now):this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop():this.loop?(this.onLoop.dispatch(this),this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop()))},play:function(a,b,c,d,e){if(a=a||"",b=b||0,"undefined"==typeof c&&(c=this._volume),"undefined"==typeof d&&(d=!1),"undefined"==typeof e&&(e=!0),this.isPlaying!==!0||e!==!1||this.override!==!1){if(this.isPlaying&&this.override&&(this.usingWebAudio?"undefined"==typeof this._sound.stop?this._sound.noteOff(0):this._sound.stop(0):this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0)),this.currentMarker=a,""!==a){if(!this.markers[a])return console.warn("Phaser.Sound.play: audio marker "+a+" doesn't exist"),void 0;this.position=this.markers[a].start,this.volume=this.markers[a].volume,this.loop=this.markers[a].loop,this.duration=this.markers[a].duration,this.durationMS=this.markers[a].durationMS,this._tempMarker=a,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else this.position=b,this.volume=c,this.loop=d,this.duration=0,this.durationMS=0,this._tempMarker=a,this._tempPosition=b,this._tempVolume=c,this._tempLoop=d;this.usingWebAudio?this.game.cache.isSoundDecoded(this.key)?(null==this._buffer&&(this._buffer=this.game.cache.getSoundData(this.key)),this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this.externalNode?this._sound.connect(this.externalNode.input):this._sound.connect(this.gainNode),this.totalDuration=this._sound.buffer.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this.loop&&""===a&&(this._sound.loop=!0),"undefined"==typeof this._sound.start?this._sound.noteGrainOn(0,this.position,this.duration):this._sound.start(0,this.position,this.duration),this.isPlaying=!0,this.startTime=this.game.time.now,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):(this.pendingPlayback=!0,this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).isDecoding===!1&&this.game.sound.decode(this.key,this)):this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked?(this.game.cache.reloadSound(this.key),this.pendingPlayback=!0):this._sound&&(this.game.device.cocoonJS||4===this._sound.readyState)?(this._sound.play(),this.totalDuration=this._sound.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this._sound.currentTime=this.position,this._sound.muted=this._muted,this._sound.volume=this._muted?0:this._volume,this.isPlaying=!0,this.startTime=this.game.time.now,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):this.pendingPlayback=!0}},restart:function(a,b,c,d){a=a||"",b=b||0,c=c||1,"undefined"==typeof d&&(d=!1),this.play(a,b,c,d,!0)},pause:function(){this.isPlaying&&this._sound&&(this.stop(),this.isPlaying=!1,this.paused=!0,this.pausedPosition=this.currentTime,this.pausedTime=this.game.time.now,this.onPause.dispatch(this))},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){var a=this.position+this.pausedPosition/1e3;this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this.externalNode?this._sound.connect(this.externalNode.input):this._sound.connect(this.gainNode),this.loop&&(this._sound.loop=!0),"undefined"==typeof this._sound.start?this._sound.noteGrainOn(0,a,this.duration):this._sound.start(0,a,this.duration)}else this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.now-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){this.isPlaying&&this._sound&&(this.usingWebAudio?"undefined"==typeof this._sound.stop?this._sound.noteOff(0):this._sound.stop(0):this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0)),this.isPlaying=!1;var a=this.currentMarker;this.currentMarker="",this.onStop.dispatch(this,a)}},c.Sound.prototype.constructor=c.Sound,Object.defineProperty(c.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(c.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(c.Sound.prototype,"mute",{get:function(){return this._muted},set:function(a){a=a||null,a?(this._muted=!0,this.usingWebAudio?(this._muteVolume=this.gainNode.gain.value,this.gainNode.gain.value=0):this.usingAudioTag&&this._sound&&(this._muteVolume=this._sound.volume,this._sound.volume=0)):(this._muted=!1,this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this)}}),Object.defineProperty(c.Sound.prototype,"volume",{get:function(){return this._volume},set:function(a){this.usingWebAudio?(this._volume=a,this.gainNode.gain.value=a):this.usingAudioTag&&this._sound&&a>=0&&1>=a&&(this._volume=a,this._sound.volume=a)}}),c.SoundManager=function(a){this.game=a,this.onSoundDecode=new c.Signal,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this.context=null,this.usingWebAudio=!0,this.usingAudioTag=!1,this.noAudio=!1,this.connectToMaster=!0,this.touchLocked=!1,this.channels=32},c.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&this.game.device.webAudio===!1&&(this.channels=1),this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock?(this.game.input.touch.callbackContext=this,this.game.input.touch.touchStartCallback=this.unlock,this.game.input.mouse.callbackContext=this,this.game.input.mouse.mouseDownCallback=this.unlock,this.touchLocked=!0):this.touchLocked=!1,window.PhaserGlobal){if(window.PhaserGlobal.disableAudio===!0)return this.usingWebAudio=!1,this.noAudio=!0,void 0;if(window.PhaserGlobal.disableWebAudio===!0)return this.usingWebAudio=!1,this.usingAudioTag=!0,this.noAudio=!1,void 0}window.AudioContext?this.context=new window.AudioContext:window.webkitAudioContext?this.context=new window.webkitAudioContext:window.Audio?(this.usingWebAudio=!1,this.usingAudioTag=!0):(this.usingWebAudio=!1,this.noAudio=!0),null!==this.context&&(this.masterGain="undefined"==typeof this.context.createGain?this.context.createGainNode():this.context.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this.context.destination))},unlock:function(){if(this.touchLocked!==!1)if(this.game.device.webAudio===!1||window.PhaserGlobal&&window.PhaserGlobal.disableWebAudio===!0)this.touchLocked=!1,this._unlockSource=null,this.game.input.touch.callbackContext=null,this.game.input.touch.touchStartCallback=null,this.game.input.mouse.callbackContext=null,this.game.input.mouse.mouseDownCallback=null;else{var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),this._unlockSource.noteOn(0)}},stopAll:function(){for(var a=0;a255)return c.Color.getColor(255,255,255);if(a>b)return c.Color.getColor(255,255,255);var e=a+Math.round(Math.random()*(b-a)),f=a+Math.round(Math.random()*(b-a)),g=a+Math.round(Math.random()*(b-a));return c.Color.getColor32(d,e,f,g)},getRGB:function(a){return{alpha:a>>>24,red:255&a>>16,green:255&a>>8,blue:255&a}},getWebRGB:function(a){var b=(a>>>24)/255,c=255&a>>16,d=255&a>>8,e=255&a;return"rgba("+c.toString()+","+d.toString()+","+e.toString()+","+b.toString()+")"},getAlpha:function(a){return a>>>24},getAlphaFloat:function(a){return(a>>>24)/255},getRed:function(a){return 255&a>>16},getGreen:function(a){return 255&a>>8},getBlue:function(a){return 255&a}};var f=function(){"use strict";function a(a,b){this.x=a||0,this.y=b||0}function b(b,c){this.pos=b||new a,this.r=c||0}function c(b,c){this.pos=b||new a,this.points=c||[],this.recalc()}function d(b,c,d){this.pos=b||new a,this.w=c||0,this.h=d||0}function e(){this.a=null,this.b=null,this.overlapN=new a,this.overlapV=new a,this.clear()}function f(a,b,c){for(var d=Number.MAX_VALUE,e=-Number.MAX_VALUE,f=a.length,g=0;f>g;g++){var h=a[g].dot(b);d>h&&(d=h),h>e&&(e=h)}c[0]=d,c[1]=e}function g(a,b,c,d,e,g){var h=p.pop(),i=p.pop(),j=n.pop().copy(b).sub(a),k=j.dot(e);if(f(c,e,h),f(d,e,i),i[0]+=k,i[1]+=k,h[0]>i[1]||i[0]>h[1])return n.push(j),p.push(h),p.push(i),!0;if(g){var l=0;if(h[0]m?m:-o}else if(g.bInA=!1,h[1]>i[1])l=h[0]-i[1],g.aInB=!1;else{var m=h[1]-i[0],o=i[1]-h[0];l=o>m?m:-o}var q=Math.abs(l);ql&&g.overlapN.reverse())}return n.push(j),p.push(h),p.push(i),!1}function h(a,b){var c=a.len2(),d=b.dot(a);return 0>d?q:d>c?s:r}function i(a,b,c){var d=n.pop().copy(b.pos).sub(a.pos),e=a.r+b.r,f=e*e,g=d.len2();if(g>f)return n.push(d),!1;if(c){var h=Math.sqrt(g);c.a=a,c.b=b,c.overlap=e-h,c.overlapN.copy(d.normalize()),c.overlapV.copy(d).scale(c.overlap),c.aInB=a.r<=b.r&&h<=b.r-a.r,c.bInA=b.r<=a.r&&h<=a.r-b.r}return n.push(d),!0}function j(a,b,c){for(var d=n.pop().copy(b.pos).sub(a.pos),e=b.r,f=e*e,g=a.points,i=g.length,j=n.pop(),k=n.pop(),l=0;i>l;l++){var m=l===i-1?0:l+1,o=0===l?i-1:l-1,p=0,r=null;j.copy(a.edges[l]),k.copy(d).sub(g[l]),c&&k.len2()>f&&(c.aInB=!1);var t=h(j,k);if(t===q){j.copy(a.edges[o]);var u=n.pop().copy(d).sub(g[o]);if(t=h(j,u),t===s){var v=k.len();if(v>e)return n.push(d),n.push(j),n.push(k),n.push(u),!1;c&&(c.bInA=!1,r=k.normalize(),p=e-v)}n.push(u)}else if(t===s){if(j.copy(a.edges[m]),k.copy(d).sub(g[m]),t=h(j,k),t===q){var v=k.len();if(v>e)return n.push(d),n.push(j),n.push(k),!1;c&&(c.bInA=!1,r=k.normalize(),p=e-v)}}else{var w=j.perp().normalize(),v=k.dot(w),x=Math.abs(v);if(v>0&&x>e)return n.push(d),n.push(w),n.push(k),!1; c&&(r=w,p=e-v,(v>=0||2*e>p)&&(c.bInA=!1))}r&&c&&Math.abs(p)i;i++)if(g(a.pos,b.pos,d,f,a.normals[i],c))return!1;for(var i=0;h>i;i++)if(g(a.pos,b.pos,d,f,b.normals[i],c))return!1;return c&&(c.a=a,c.b=b,c.overlapV.copy(c.overlapN).scale(c.overlap)),!0}var m={};m.Vector=a,m.V=a,a.prototype.copy=a.prototype.copy=function(a){return this.x=a.x,this.y=a.y,this},a.prototype.perp=a.prototype.perp=function(){var a=this.x;return this.x=this.y,this.y=-a,this},a.prototype.rotate=a.prototype.rotate=function(a){var b=this.x,c=this.y;return this.x=b*Math.cos(a)-c*Math.sin(a),this.y=b*Math.sin(a)+c*Math.cos(a),this},a.prototype.rotatePrecalc=a.prototype.rotatePrecalc=function(a,b){var c=this.x,d=this.y;return this.x=c*b-d*a,this.y=c*a+d*b,this},a.prototype.reverse=a.prototype.reverse=function(){return this.x=-this.x,this.y=-this.y,this},a.prototype.normalize=a.prototype.normalize=function(){var a=this.len();return a>0&&(this.x=this.x/a,this.y=this.y/a),this},a.prototype.add=a.prototype.add=function(a){return this.x+=a.x,this.y+=a.y,this},a.prototype.sub=a.prototype.sub=function(a){return this.x-=a.x,this.y-=a.y,this},a.prototype.scale=a.prototype.scale=function(a,b){return this.x*=a,this.y*=b||a,this},a.prototype.project=a.prototype.project=function(a){var b=this.dot(a)/a.len2();return this.x=b*a.x,this.y=b*a.y,this},a.prototype.projectN=a.prototype.projectN=function(a){var b=this.dot(a);return this.x=b*a.x,this.y=b*a.y,this},a.prototype.reflect=a.prototype.reflect=function(a){var b=this.x,c=this.y;return this.project(a).scale(2),this.x-=b,this.y-=c,this},a.prototype.reflectN=a.prototype.reflectN=function(a){var b=this.x,c=this.y;return this.projectN(a).scale(2),this.x-=b,this.y-=c,this},a.prototype.dot=a.prototype.dot=function(a){return this.x*a.x+this.y*a.y},a.prototype.len2=a.prototype.len2=function(){return this.dot(this)},a.prototype.len=a.prototype.len=function(){return Math.sqrt(this.len2())},m.Circle=b,m.Polygon=c,c.prototype.recalc=c.prototype.recalc=function(){this.edges=[],this.normals=[];for(var b=this.points,c=b.length,d=0;c>d;d++){var e=b[d],f=c-1>d?b[d+1]:b[0],g=(new a).copy(f).sub(e),h=(new a).copy(g).perp().normalize();this.edges.push(g),this.normals.push(h)}return this},c.prototype.rotate=c.prototype.rotate=function(a){var b,c=this.points,d=this.edges,e=this.normals,f=c.length,g=Math.cos(a),h=Math.sin(a);for(b=0;f>b;b++)c[b].rotatePrecalc(h,g),d[b].rotatePrecalc(h,g),e[b].rotatePrecalc(h,g);return this},c.prototype.scale=c.prototype.scale=function(a,b){var c,d=this.points,e=this.edges,f=this.normals,g=d.length;for(c=0;g>c;c++)d[c].scale(a,b),e[c].scale(a,b),f[c].scale(a,b);return this},c.prototype.translate=c.prototype.translate=function(a,b){var c,d=this.points,e=d.length;for(c=0;e>c;c++)d[c].x+=a,d[c].y+=b;return this},m.Box=d,d.prototype.toPolygon=d.prototype.toPolygon=function(){var b=this.pos,d=this.w,e=this.h;return new c(new a(b.x,b.y),[new a,new a(d,0),new a(d,e),new a(0,e)])},m.Response=e,e.prototype.clear=e.prototype.clear=function(){return this.aInB=!0,this.bInA=!0,this.overlap=Number.MAX_VALUE,this};for(var n=[],o=0;10>o;o++)n.push(new a);for(var p=[],o=0;5>o;o++)p.push([]);var q=-1,r=0,s=1;return m.testCircleCircle=i,m.testPolygonCircle=j,m.testCirclePolygon=k,m.testPolygonPolygon=l,m}();return c.Physics={},c.Physics.Arcade=function(a){this.game=a,this.gravity=new c.Point,this.worldLeft=null,this.worldRight=null,this.worldTop=null,this.worldBottom=null,this.worldPolys=[null,null,null,null],this.quadTree=new c.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.maxObjects=10,this.maxLevels=4,this._mapData=[],this._mapTiles=0,this._result=!1,this._total=0,this._angle=0,this._drag=0,this._dx=0,this._dy=0,this._p=new c.Point(0,0),this._intersection=[0,0,0,0],this._gravityX=0,this._gravityY=0,this._response=new f.Response,this.setBoundsToWorld(!0,!0,!0,!0)},c.Physics.Arcade.RECT=0,c.Physics.Arcade.CIRCLE=1,c.Physics.Arcade.POLYGON=2,c.Physics.Arcade.prototype={checkBounds:function(a){if(!a.collideWorldBounds||!this.worldLeft&&!this.worldRight&&!this.worldTop&&!this.worldBottom)return!1;this._response.clear();var b=f.testPolygonPolygon,d=a.polygon,e=!1;return a.type===c.Physics.Arcade.CIRCLE&&(b=f.testPolygonCircle,d=a.shape),this.worldLeft&&b(this.worldPolys[0],d,this._response)?(a.blocked.left=!0,d.pos.add(this._response.overlapV),a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),e=!0):this.worldRight&&b(this.worldPolys[1],d,this._response)&&(a.blocked.right=!0,d.pos.add(this._response.overlapV),a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),e=!0),this._response.clear(),this.worldTop&&b(this.worldPolys[2],d,this._response)?(a.blocked.up=!0,d.pos.add(this._response.overlapV),a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),e=!0):this.worldBottom&&b(this.worldPolys[3],d,this._response)&&(a.blocked.down=!0,d.pos.add(this._response.overlapV),a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),e=!0),e},setBoundsToWorld:function(a,b,c,d){this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,a,b,c,d)},setBounds:function(a,b,c,d,e,g,h,i){"undefined"==typeof e&&(e=!0),"undefined"==typeof g&&(g=!0),"undefined"==typeof h&&(h=!0),"undefined"==typeof i&&(i=!0);var j=100;e?(this.worldLeft=new f.Box(new f.Vector(a-j,b),j,d),this.worldPolys[0]=this.worldLeft.toPolygon()):(this.worldLeft=null,this.worldPolys[0]=null),g?(this.worldRight=new f.Box(new f.Vector(a+c,b),j,d),this.worldPolys[1]=this.worldRight.toPolygon()):(this.worldRight=null,this.worldPolys[1]=null),h?(this.worldTop=new f.Box(new f.Vector(a,b-j),c,j),this.worldPolys[2]=this.worldTop.toPolygon()):(this.worldTop=null,this.worldPolys[2]=null),i?(this.worldBottom=new f.Box(new f.Vector(a,b+d),c,j),this.worldPolys[3]=this.worldBottom.toPolygon()):(this.worldBottom=null,this.worldPolys[3]=null)},updateMotion:function(a){return a.allowGravity?(this._gravityX=this.gravity.x+a.gravity.x,this._gravityY=this.gravity.y+a.gravity.y):(this._gravityX=a.gravity.x,this._gravityY=a.gravity.y),(this._gravityX<0&&a.blocked.left||this._gravityX>0&&a.blocked.right)&&(this._gravityX=0),(this._gravityY<0&&a.blocked.up||this._gravityY>0&&a.blocked.down)&&(this._gravityY=0),a.allowRotation&&(this._velocityDelta=a.angularAcceleration*this.game.time.physicsElapsed,0!==a.angularDrag&&0===a.angularAcceleration&&(this._drag=a.angularDrag*this.game.time.physicsElapsed,a.angularVelocity>0?a.angularVelocity-=this._drag:a.angularVelocity<0&&(a.angularVelocity+=this._drag)),a.rotation+=this.game.time.physicsElapsed*(a.angularVelocity+this._velocityDelta/2),a.angularVelocity+=this._velocityDelta,a.angularVelocity>a.maxAngular?a.angularVelocity=a.maxAngular:a.angularVelocity<-a.maxAngular&&(a.angularVelocity=-a.maxAngular)),this._p.setTo((a.acceleration.x+this._gravityX)*this.game.time.physicsElapsed,(a.acceleration.y+this._gravityY)*this.game.time.physicsElapsed),this._p},overlap:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._result=!1,this._total=0,Array.isArray(b))for(var f=0,g=b.length;g>f;f++)this.collideHandler(a,b[f],c,d,e,!0);else this.collideHandler(a,b,c,d,e,!0);return this._total>0},collide:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._result=!1,this._total=0,Array.isArray(b))for(var f=0,g=b.length;g>f;f++)this.collideHandler(a,b[f],c,d,e,!1);else this.collideHandler(a,b,c,d,e,!1);return this._total>0},collideHandler:function(a,b,d,e,f,g){return"undefined"!=typeof b||a.type!==c.GROUP&&a.type!==c.EMITTER?(a&&b&&a.exists&&b.exists&&(a.type==c.SPRITE||a.type==c.TILESPRITE?b.type==c.SPRITE||b.type==c.TILESPRITE?this.collideSpriteVsSprite(a,b,d,e,f,g):b.type==c.GROUP||b.type==c.EMITTER?this.collideSpriteVsGroup(a,b,d,e,f,g):b.type==c.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(a,b,d,e,f):a.type==c.GROUP?b.type==c.SPRITE||b.type==c.TILESPRITE?this.collideSpriteVsGroup(b,a,d,e,f,g):b.type==c.GROUP||b.type==c.EMITTER?this.collideGroupVsGroup(a,b,d,e,f,g):b.type==c.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,d,e,f):a.type==c.TILEMAPLAYER?b.type==c.SPRITE||b.type==c.TILESPRITE?this.collideSpriteVsTilemapLayer(b,a,d,e,f):(b.type==c.GROUP||b.type==c.EMITTER)&&this.collideGroupVsTilemapLayer(b,a,d,e,f):a.type==c.EMITTER&&(b.type==c.SPRITE||b.type==c.TILESPRITE?this.collideSpriteVsGroup(b,a,d,e,f,g):b.type==c.GROUP||b.type==c.EMITTER?this.collideGroupVsGroup(a,b,d,e,f,g):b.type==c.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,d,e,f))),void 0):(this.collideGroupVsSelf(a,d,e,f,g),void 0)},collideSpriteVsSprite:function(a,b,c,d,e,f){this.separate(a.body,b.body,d,e,f)&&(c&&c.call(e,a,b),this._total++)},collideSpriteVsGroup:function(a,b,d,e,f,g){if(0!==b.length){this.quadTree.clear(),this.quadTree=new c.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(b),this._potentials=this.quadTree.retrieve(a);for(var h=0,i=this._potentials.length;i>h;h++)this.separate(a.body,this._potentials[h],e,f,g)&&(d&&d.call(f,a,this._potentials[h].sprite),this._total++)}},collideGroupVsSelf:function(a,b,c,d,e){if(0!==a.length)for(var f=a._container.children.length,g=0;f>g;g++)for(var h=g+1;f>=h;h++)a._container.children[g]&&a._container.children[h]&&a._container.children[g].exists&&a._container.children[h].exists&&this.collideSpriteVsSprite(a._container.children[g],a._container.children[h],b,c,d,e)},collideGroupVsGroup:function(a,b,c,d,e,f){if(0!==a.length&&0!==b.length&&a._container.first._iNext){var g=a._container.first._iNext;do g.exists&&this.collideSpriteVsGroup(g,b,c,d,e,f),g=g._iNext;while(g!=a._container.last._iNext)}},collideSpriteVsTilemapLayer:function(a,b,c,d,e){if(this._mapData=b.getTiles(a.body.left,a.body.top,a.body.width,a.body.height,!0),0!==this._mapData.length)if(this._mapData.length>1)this.separateTiles(a.body,this._mapData);else{var f=0;this.separateTile(a.body,this._mapData[f])&&(d?d.call(e,a,this._mapData[f])&&(this._total++,c&&c.call(e,a,this._mapData[f])):(this._total++,c&&c.call(e,a,this._mapData[f])))}},collideGroupVsTilemapLayer:function(a,b,c,d,e){if(0!==a.length&&a._container.first._iNext){var f=a._container.first._iNext;do f.exists&&this.collideSpriteVsTilemapLayer(f,b,c,d,e),f=f._iNext;while(f!=a._container.last._iNext)}},separate:function(a,b,c,d,e){return a===b||this.intersects(a,b)===!1?!1:c&&c.call(d,a.sprite,b.sprite)===!1?!1:(this._response.clear(),e?a.overlap(b,this._response):a.overlap(b,this._response)?a.separate(b,this._response):!1)},intersects:function(a,b){var c=!1;(a.width<=0||a.height<=0||b.width<=0||b.height<=0)&&(c=!1),c=!(a.rightb.right||a.top>b.bottom),!c&&a.inContact(b)&&a.removeContact(b)},tileIntersects:function(a,b){return a.width<=0||a.height<=0||b.width<=0||b.height<=0?(this._intersection[4]=0,this._intersection):a.rightb.right||a.top>b.bottom?(this._intersection[4]=0,this._intersection):(this._intersection[0]=Math.max(a.left,b.x),this._intersection[1]=Math.max(a.top,b.y),this._intersection[2]=Math.min(a.right,b.right)-this._intersection[0],this._intersection[3]=Math.min(a.bottom,b.bottom)-this._intersection[1],this._intersection[4]=1,this._intersection)},separateTiles:function(a,b){for(var c,d=!1,e=0;e0&&a.checkCollision.right&&b.tile.faceLeft&&!a.blocked.right&&(a.overlapX=a.right-b.x,a.overlapX>0?c=!0:a.overlapX=0),a.deltaY()<0&&a.checkCollision.up&&b.tile.faceBottom&&!a.blocked.up?(a.overlapY=a.top-b.bottom,a.overlapY<0?c=!0:a.overlapY=0):a.deltaY()>0&&a.checkCollision.down&&b.tile.faceTop&&!a.blocked.down&&(a.overlapY=a.bottom-b.y,a.overlapY>0?c=!0:a.overlapY=0),0!==a.overlapX&&0!==a.overlapY&&(Math.abs(a.overlapX)>Math.abs(a.overlapY)?a.overlapX=0:a.overlapY=0),c?this.processTileSeparation(a):!1},processTileSeparation:function(a){return a.overlapX<0?(a.x-=a.overlapX,a.left-=a.overlapX,a.right-=a.overlapX,a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),a.blocked.left=!0):a.overlapX>0&&(a.x-=a.overlapX,a.left-=a.overlapX,a.right-=a.overlapX,a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),a.blocked.right=!0),a.overlapY<0?(a.y-=a.overlapY,a.top-=a.overlapY,a.bottom-=a.overlapY,a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),a.blocked.up=!0):a.overlapY>0&&(a.y-=a.overlapY,a.top-=a.overlapY,a.bottom-=a.overlapY,a.blocked.x=Math.floor(a.x),a.blocked.y=Math.floor(a.y),a.blocked.down=!0),a.reboundCheck(a.overlapX,a.overlapY,!0),!0},moveToObject:function(a,b,c,d){return"undefined"==typeof c&&(c=60),"undefined"==typeof d&&(d=0),this._angle=Math.atan2(b.y-a.y,b.x-a.x),d>0&&(c=this.distanceBetween(a,b)/(d/1e3)),a.body.velocity.x=Math.cos(this._angle)*c,a.body.velocity.y=Math.sin(this._angle)*c,this._angle},moveToPointer:function(a,b,c,d){return"undefined"==typeof b&&(b=60),c=c||this.game.input.activePointer,"undefined"==typeof d&&(d=0),this._angle=this.angleToPointer(a,c),d>0&&(b=this.distanceToPointer(a,c)/(d/1e3)),a.body.velocity.x=Math.cos(this._angle)*b,a.body.velocity.y=Math.sin(this._angle)*b,this._angle},moveToXY:function(a,b,c,d,e){return"undefined"==typeof d&&(d=60),"undefined"==typeof e&&(e=0),this._angle=Math.atan2(c-a.y,b-a.x),e>0&&(d=this.distanceToXY(a,b,c)/(e/1e3)),a.body.velocity.x=Math.cos(this._angle)*d,a.body.velocity.y=Math.sin(this._angle)*d,this._angle},velocityFromAngle:function(a,b,d){return"undefined"==typeof b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(this.game.math.degToRad(a))*b,Math.sin(this.game.math.degToRad(a))*b)},velocityFromRotation:function(a,b,d){return"undefined"==typeof b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerationFromRotation:function(a,b,d){return"undefined"==typeof b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerateToObject:function(a,b,c,d,e){return"undefined"==typeof c&&(c=60),"undefined"==typeof d&&(d=1e3),"undefined"==typeof e&&(e=1e3),this._angle=this.angleBetween(a,b),a.body.acceleration.setTo(Math.cos(this._angle)*c,Math.sin(this._angle)*c),a.body.maxVelocity.setTo(d,e),this._angle},accelerateToPointer:function(a,b,c,d,e){return"undefined"==typeof c&&(c=60),"undefined"==typeof b&&(b=this.game.input.activePointer),"undefined"==typeof d&&(d=1e3),"undefined"==typeof e&&(e=1e3),this._angle=this.angleToPointer(a,b),a.body.acceleration.setTo(Math.cos(this._angle)*c,Math.sin(this._angle)*c),a.body.maxVelocity.setTo(d,e),this._angle},accelerateToXY:function(a,b,c,d,e,f){return"undefined"==typeof d&&(d=60),"undefined"==typeof e&&(e=1e3),"undefined"==typeof f&&(f=1e3),this._angle=this.angleToXY(a,b,c),a.body.acceleration.setTo(Math.cos(this._angle)*d,Math.sin(this._angle)*d),a.body.maxVelocity.setTo(e,f),this._angle},distanceBetween:function(a,b){return this._dx=a.x-b.x,this._dy=a.y-b.y,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},distanceToXY:function(a,b,c){return this._dx=a.x-b,this._dy=a.y-c,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},distanceToPointer:function(a,b){return b=b||this.game.input.activePointer,this._dx=a.x-b.x,this._dy=a.y-b.y,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},angleBetween:function(a,b){return this._dx=b.x-a.x,this._dy=b.y-a.y,Math.atan2(this._dy,this._dx)},angleToXY:function(a,b,c){return this._dx=b-a.x,this._dy=c-a.y,Math.atan2(this._dy,this._dx)},angleToPointer:function(a,b){return b=b||this.game.input.activePointer,this._dx=b.worldX-a.x,this._dy=b.worldY-a.y,Math.atan2(this._dy,this._dx)}},c.Physics.Arcade.prototype.constructor=c.Physics.Arcade,c.Physics.Arcade.Body=function(a){this.sprite=a,this.game=a.game,this.offset=new c.Point,this.preX=a.world.x,this.preY=a.world.y,this.preRotation=a.angle,this.velocity=new c.Point,this.acceleration=new c.Point,this.speed=0,this.angle=0,this.gravity=new c.Point,this.bounce=new c.Point,this.minVelocity=new c.Point,this.maxVelocity=new c.Point(1e3,1e3),this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.linearDamping=0,this.checkCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={x:0,y:0,up:!1,down:!1,left:!1,right:!1},this.facing=c.NONE,this.rebound=!0,this.immovable=!1,this.moves=!0,this.rotation=0,this.allowRotation=!0,this.allowGravity=!0,this.customSeparateCallback=null,this.customSeparateContext=null,this.collideCallback=null,this.collideCallbackContext=null,this.collideWorldBounds=!1,this.type=c.Physics.Arcade.RECT,this.shape=null,this.polygon=null,this.left=0,this.right=0,this.top=0,this.bottom=0,this.width=0,this.height=0,this.contacts=[],this.overlapX=0,this.overlapY=0,this._temp=null,this._dx=0,this._dy=0,this._sx=a.scale.x,this._sy=a.scale.y,this._distances=[0,0,0,0],this._vx=0,this._vy=0,this.setRectangle(a.width,a.height,0,0),this.sprite.events.onBeginContact=new c.Signal,this.sprite.events.onEndContact=new c.Signal},c.Physics.Arcade.Body.prototype={updateScale:function(){this.polygon?this.polygon.scale(this.sprite.scale.x/this._sx,this.sprite.scale.y/this._sy):this.shape.r*=Math.max(this.sprite.scale.x,this.sprite.scale.y),this._sx=this.sprite.scale.x,this._sy=this.sprite.scale.y},preUpdate:function(){this.x=this.sprite.world.x-this.sprite.anchor.x*this.sprite.width+this.offset.x,this.y=this.sprite.world.y-this.sprite.anchor.y*this.sprite.height+this.offset.y,this.preX=this.x,this.preY=this.y,this.preRotation=this.sprite.angle,this.rotation=this.preRotation,(this.sprite.scale.x!==this._sx||this.sprite.scale.y!==this._sy)&&this.updateScale(),this.checkBlocked(),this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.moves?((this._vx!==this.velocity.x||this._vy!==this.velocity.y)&&(this._vx=this.velocity.x,this._vy=this.velocity.y,this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.game.physics.checkBounds(this)&&this.reboundCheck(!0,!0,!0),this.applyDamping(),this.integrateVelocity(),this.updateBounds(),this.checkBlocked()):this.updateBounds()},checkBlocked:function(){!this.blocked.left&&!this.blocked.right||Math.floor(this.x)===this.blocked.x&&Math.floor(this.y)===this.blocked.y||(this.blocked.left=!1,this.blocked.right=!1),!this.blocked.up&&!this.blocked.down||Math.floor(this.x)===this.blocked.x&&Math.floor(this.y)===this.blocked.y||(this.blocked.up=!1,this.blocked.down=!1)},updateBounds:function(){this.type===c.Physics.Arcade.CIRCLE?(this.left=this.shape.pos.x-this.shape.r,this.right=this.shape.pos.x+this.shape.r,this.top=this.shape.pos.y-this.shape.r,this.bottom=this.shape.pos.y+this.shape.r):(this.left=c.Math.minProperty("x",this.polygon.points)+this.polygon.pos.x,this.right=c.Math.maxProperty("x",this.polygon.points)+this.polygon.pos.x,this.top=c.Math.minProperty("y",this.polygon.points)+this.polygon.pos.y,this.bottom=c.Math.maxProperty("y",this.polygon.points)+this.polygon.pos.y),this.width=this.right-this.left,this.height=this.bottom-this.top},applyDamping:function(){this.linearDamping>0&&this.acceleration.isZero()&&(this.speed>this.linearDamping?this.speed-=this.linearDamping:this.speed=0,this.speed>0&&(this.velocity.x=Math.cos(this.angle)*this.speed,this.velocity.y=Math.sin(this.angle)*this.speed,this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),this.angle=Math.atan2(this.velocity.y,this.velocity.x)))},reboundCheck:function(a,b,c){if(a&&(c&&0!==this.bounce.x&&(this.blocked.left||this.blocked.right||this.touching.left||this.touching.right)&&(this._vx<=0&&this.velocity.x>0||this._vx>=0&&this.velocity.x<0||(this.velocity.x*=-this.bounce.x,this.angle=Math.atan2(this.velocity.y,this.velocity.x))),0===this.bounce.x||Math.abs(this.velocity.x)d||this.velocity.x<0)||(this.blocked.right||this.touching.right)&&(d>0||this.velocity.x>0))&&(this.velocity.x=0)}if(b&&(c&&0!==this.bounce.y&&(this.blocked.up||this.blocked.down||this.touching.up||this.touching.down)&&(this._vy<=0&&this.velocity.y>0||this._vy>=0&&this.velocity.y<0||(this.velocity.y*=-this.bounce.y,this.angle=Math.atan2(this.velocity.y,this.velocity.x))),0===this.bounce.y||Math.abs(this.velocity.y)e||this.velocity.y<0)||(this.blocked.down||this.touching.down)&&(e>0||this.velocity.y>0))&&(this.velocity.y=0)}},getUpwardForce:function(){return this.allowGravity?this.gravity.x+this.game.physics.gravity.x+this.velocity.x:this.gravity.x+this.velocity.x},getDownwardForce:function(){return this.allowGravity?this.gravity.y+this.game.physics.gravity.y+this.velocity.y:this.gravity.y+this.velocity.y},sub:function(a){this.x-=a.x,this.y-=a.y},add:function(a){this.x+=a.x,this.y+=a.y},give:function(a,b){this.add(b.overlapV),this.rebound&&(this.processRebound(a),this.reboundCheck(!0,!0,!1),a.reboundCheck(!0,!0,!1))},take:function(a,b){this.sub(b.overlapV),this.rebound&&(this.processRebound(a),this.reboundCheck(!0,!0,!1),a.reboundCheck(!0,!0,!1))},split:function(a,b){b.overlapV.scale(.5),this.sub(b.overlapV),a.add(b.overlapV),this.rebound&&(this.exchange(a),this.reboundCheck(!0,!0,!1),a.reboundCheck(!0,!0,!1))},exchange:function(a){if(this.mass===a.mass&&this.speed>0&&a.speed>0)this._dx=a.velocity.x,this._dy=a.velocity.y,a.velocity.x=this.velocity.x*a.bounce.x,a.velocity.y=this.velocity.y*a.bounce.x,this.velocity.x=this._dx*this.bounce.x,this.velocity.y=this._dy*this.bounce.y;else{var b=Math.sqrt(a.velocity.x*a.velocity.x*a.mass/this.mass)*(a.velocity.x>0?1:-1),c=Math.sqrt(this.velocity.x*this.velocity.x*this.mass/a.mass)*(this.velocity.x>0?1:-1),d=.5*(b+c);b-=d,c-=d,this.velocity.x=b,a.velocity.x=c,b=Math.sqrt(a.velocity.y*a.velocity.y*a.mass/this.mass)*(a.velocity.y>0?1:-1),c=Math.sqrt(this.velocity.y*this.velocity.y*this.mass/a.mass)*(this.velocity.y>0?1:-1),d=.5*(b+c),b-=d,c-=d,this.velocity.y=b,a.velocity.y=c}},processRebound:function(a){this._vx<=0&&this.velocity.x>0||this._vx>=0&&this.velocity.x<0||(this.velocity.x=a.velocity.x-this.velocity.x*this.bounce.x),this._vy<=0&&this.velocity.y>0||this._vy>=0&&this.velocity.y<0||(this.velocity.y=a.velocity.y-this.velocity.y*this.bounce.y),this.angle=Math.atan2(this.velocity.y,this.velocity.x),this.reboundCheck(!0,!0,!1)},overlap:function(a,b){var d=!1;return this.type!==c.Physics.Arcade.RECT&&this.type!==c.Physics.Arcade.POLYGON||a.type!==c.Physics.Arcade.RECT&&a.type!==c.Physics.Arcade.POLYGON?this.type===c.Physics.Arcade.CIRCLE&&a.type===c.Physics.Arcade.CIRCLE?d=f.testCircleCircle(this.shape,a.shape,b):this.type!==c.Physics.Arcade.RECT&&this.type!==c.Physics.Arcade.POLYGON||a.type!==c.Physics.Arcade.CIRCLE?this.type!==c.Physics.Arcade.CIRCLE||a.type!==c.Physics.Arcade.RECT&&a.type!==c.Physics.Arcade.POLYGON||(d=f.testCirclePolygon(this.shape,a.polygon,b)):d=f.testPolygonCircle(this.polygon,a.shape,b):d=f.testPolygonPolygon(this.polygon,a.polygon,b),d||this.removeContact(a),d},inContact:function(a){return-1!=this.contacts.indexOf(a)},addContact:function(a){return this.inContact(a)?!1:(this.contacts.push(a),this.sprite.events.onBeginContact.dispatch(this.sprite,a.sprite,this,a),a.addContact(this),!0)},removeContact:function(a){return this.inContact(a)?(this.contacts.splice(this.contacts.indexOf(a),1),this.sprite.events.onEndContact.dispatch(this.sprite,a.sprite,this,a),a.removeContact(this),!0):!1},separate:function(a,b){if(this._distances[0]=a.right-this.x,this._distances[1]=this.right-a.x,this._distances[2]=a.bottom-this.y,this._distances[3]=this.bottom-a.y,!b.overlapN.x||0!==this._distances[0]&&0!==this._distances[1]?!b.overlapN.y||0!==this._distances[2]&&0!==this._distances[3]||(b.overlapN.x=!0,b.overlapN.y=!1):(b.overlapN.x=!1,b.overlapN.y=!0),this.customSeparateCallback)return this.customSeparateCallback.call(this.customSeparateContext,this,b,this._distances);var c=!1;return b.overlapN.x?this._distances[0]0&&!this.blocked.right&&!this.touching.right)&&(this.x+=this._dx,this.velocity.x+=this._temp.x),(this._dy<0&&!this.blocked.up&&!this.touching.up||this._dy>0&&!this.blocked.down&&!this.touching.down)&&(this.y+=this._dy,this.velocity.y+=this._temp.y),this.velocity.x>this.maxVelocity.x?this.velocity.x=this.maxVelocity.x:this.velocity.x<-this.maxVelocity.x&&(this.velocity.x=-this.maxVelocity.x),this.velocity.y>this.maxVelocity.y?this.velocity.y=this.maxVelocity.y:this.velocity.y<-this.maxVelocity.y&&(this.velocity.y=-this.maxVelocity.y)},postUpdate:function(){this.moves&&(this.game.physics.checkBounds(this),this.reboundCheck(!0,!0,!0),this._dx=this.deltaX(),this._dy=this.deltaY(),this._dx<0?this.facing=c.LEFT:this._dx>0&&(this.facing=c.RIGHT),this._dy<0?this.facing=c.UP:this._dy>0&&(this.facing=c.DOWN),(0!==this._dx||0!==this._dy)&&(this.sprite.x+=this._dx,this.sprite.y+=this._dy),this.allowRotation&&0!==this.deltaZ()&&(this.sprite.angle+=this.deltaZ()),(this.sprite.scale.x!==this._sx||this.sprite.scale.y!==this._sy)&&this.updateScale())},reset:function(a){"undefined"==typeof a&&(a=!1),a&&(this.gravity.setTo(0,0),this.bounce.setTo(0,0),this.minVelocity.setTo(5,5),this.maxVelocity.setTo(1e3,1e3),this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.friction=0,this.checkCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0}),this.velocity.setTo(0,0),this.acceleration.setTo(0,0),this.angularVelocity=0,this.angularAcceleration=0,this.blocked={x:0,y:0,up:!1,down:!1,left:!1,right:!1},this.x=this.sprite.world.x-this.sprite.anchor.x*this.sprite.width+this.offset.x,this.y=this.sprite.world.y-this.sprite.anchor.y*this.sprite.height+this.offset.y,this.preX=this.x,this.preY=this.y,this.updateBounds(),this.contacts.length=0},destroy:function(){this.sprite=null,this.collideCallback=null,this.collideCallbackContext=null,this.customSeparateCallback=null,this.customSeparateContext=null,this.contacts.length=0},setCircle:function(a,b,d){"undefined"==typeof b&&(b=this.sprite._cache.halfWidth),"undefined"==typeof d&&(d=this.sprite._cache.halfHeight),this.type=c.Physics.Arcade.CIRCLE,this.shape=new f.Circle(new f.Vector(this.sprite.x,this.sprite.y),a),this.polygon=null,this.offset.setTo(b,d)},setRectangle:function(a,b,d,e){"undefined"==typeof a&&(a=this.sprite.width),"undefined"==typeof b&&(b=this.sprite.height),"undefined"==typeof d&&(d=-this.sprite._cache.halfWidth),"undefined"==typeof e&&(e=-this.sprite._cache.halfHeight),this.type=c.Physics.Arcade.RECT,this.shape=new f.Box(new f.Vector(this.sprite.world.x,this.sprite.world.y),a,b),this.polygon=this.shape.toPolygon(),this.polygon.translate(d,e),this.offset.setTo(0,0)},setPolygon:function(a){if(this.type=c.Physics.Arcade.POLYGON,this.shape=null,Array.isArray(a)||(a=Array.prototype.slice.call(arguments)),"number"==typeof a[0]){for(var b=[],d=0,e=a.length;e>d;d+=2)b.push(new f.Vector(a[d],a[d+1]));a=b}this.polygon=new f.Polygon(new f.Vector(this.sprite.center.x,this.sprite.center.y),a),this.offset.setTo(0,0)},translate:function(a,b){this.polygon&&this.polygon.translate(a,b)},onFloor:function(){return this.blocked.down},onWall:function(){return!this.blocked.down&&(this.blocked.left||this.blocked.right)},deltaX:function(){return this.x-this.preX},deltaY:function(){return this.y-this.preY},deltaZ:function(){return this.rotation-this.preRotation}},c.Physics.Arcade.Body.prototype.constructor=c.Physics.Arcade.Body,Object.defineProperty(c.Physics.Arcade.Body.prototype,"x",{get:function(){return this.type===c.Physics.Arcade.CIRCLE?this.shape.pos.x:this.polygon.pos.x},set:function(a){this.type===c.Physics.Arcade.CIRCLE?this.shape.pos.x=a:this.polygon.pos.x=a}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"y",{get:function(){return this.type===c.Physics.Arcade.CIRCLE?this.shape.pos.y:this.polygon.pos.y},set:function(a){this.type===c.Physics.Arcade.CIRCLE?this.shape.pos.y=a:this.polygon.pos.y=a}}),c.Particles=function(a){this.game=a,this.emitters={},this.ID=0},c.Particles.prototype={add:function(a){return this.emitters[a.name]=a,a},remove:function(a){delete this.emitters[a.name]},update:function(){for(var a in this.emitters)this.emitters[a].exists&&this.emitters[a].update()}},c.Particles.prototype.constructor=c.Particles,c.Particles.Arcade={},c.Particles.Arcade.Emitter=function(a,b,d,e){this.maxParticles=e||50,c.Group.call(this,a),this.name="emitter"+this.game.particles.ID++,this.type=c.EMITTER,this.x=0,this.y=0,this.width=1,this.height=1,this.minParticleSpeed=new c.Point(-100,-100),this.maxParticleSpeed=new c.Point(100,100),this.minParticleScale=1,this.maxParticleScale=1,this.minRotation=-360,this.maxRotation=360,this.gravity=100,this.particleClass=null,this.particleFriction=0,this.angularDrag=0,this.frequency=100,this.lifespan=2e3,this.bounce=new c.Point,this._quantity=0,this._timer=0,this._counter=0,this._explode=!0,this.on=!1,this.exists=!0,this.emitX=b,this.emitY=d -},c.Particles.Arcade.Emitter.prototype=Object.create(c.Group.prototype),c.Particles.Arcade.Emitter.prototype.constructor=c.Particles.Arcade.Emitter,c.Particles.Arcade.Emitter.prototype.update=function(){if(this.on)if(this._explode){this._counter=0;do this.emitParticle(),this._counter++;while(this._counter=this._timer&&(this.emitParticle(),this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1),this._timer=this.game.time.now+this.frequency)},c.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,d,e,f){"undefined"==typeof b&&(b=0),"undefined"==typeof d&&(d=this.maxParticles),"undefined"==typeof e&&(e=!1),"undefined"==typeof f&&(f=!1);for(var g,h=0,i=a,j=b;d>h;)null===this.particleClass&&("object"==typeof a&&(i=this.game.rnd.pick(a)),"object"==typeof b&&(j=this.game.rnd.pick(b)),g=new c.Sprite(this.game,0,0,i,j)),e?(g.body.checkCollision.any=!0,g.body.checkCollision.none=!1):g.body.checkCollision.none=!0,g.body.collideWorldBounds=f,g.exists=!1,g.visible=!1,g.anchor.setTo(.5,.5),this.add(g),h++;return this},c.Particles.Arcade.Emitter.prototype.kill=function(){this.on=!1,this.alive=!1,this.exists=!1},c.Particles.Arcade.Emitter.prototype.revive=function(){this.alive=!0,this.exists=!0},c.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d){"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=250),"undefined"==typeof d&&(d=0),this.revive(),this.visible=!0,this.on=!0,this._explode=a,this.lifespan=b,this.frequency=c,a?this._quantity=d:this._quantity+=d,this._counter=0,this._timer=this.game.time.now+c},c.Particles.Arcade.Emitter.prototype.emitParticle=function(){var a=this.getFirstExists(!1);if(null!=a){if(this.width>1||this.height>1?a.reset(this.game.rnd.integerInRange(this.left,this.right),this.game.rnd.integerInRange(this.top,this.bottom)):a.reset(this.emitX,this.emitY),a.lifespan=this.lifespan,a.body.bounce.setTo(this.bounce.x,this.bounce.y),a.body.velocity.x=this.minParticleSpeed.x!=this.maxParticleSpeed.x?this.game.rnd.integerInRange(this.minParticleSpeed.x,this.maxParticleSpeed.x):this.minParticleSpeed.x,a.body.velocity.y=this.minParticleSpeed.y!=this.maxParticleSpeed.y?this.game.rnd.integerInRange(this.minParticleSpeed.y,this.maxParticleSpeed.y):this.minParticleSpeed.y,a.body.gravity.y=this.gravity,a.body.angularVelocity=this.minRotation!=this.maxRotation?this.game.rnd.integerInRange(this.minRotation,this.maxRotation):this.minRotation,1!==this.minParticleScale||1!==this.maxParticleScale){var b=this.game.rnd.realInRange(this.minParticleScale,this.maxParticleScale);a.scale.setTo(b,b)}a.body.friction=this.particleFriction,a.body.angularDrag=this.angularDrag}},c.Particles.Arcade.Emitter.prototype.setSize=function(a,b){this.width=a,this.height=b},c.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b},c.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b},c.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b},c.Particles.Arcade.Emitter.prototype.at=function(a){a.center&&(this.emitX=a.center.x,this.emitY=a.center.y)},Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"alpha",{get:function(){return this._container.alpha},set:function(a){this._container.alpha=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"visible",{get:function(){return this._container.visible},set:function(a){this._container.visible=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.height/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.height/2)}}),c.Tile=function(a,b,c,d,e,f){this.layer=a,this.index=b,this.x=c,this.y=d,this.width=e,this.height=f,this.alpha=1,this.properties={},this.scanned=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this.collides=!1,this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.callback=null,this.callbackContext=this},c.Tile.prototype={setCollisionCallback:function(a,b){this.collisionCallbackContext=b,this.collisionCallback=a},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.collideNone=a||b||c||d?!1:!0},resetCollision:function(){this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collides=a.collides,this.collideNone=a.collideNone,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){return this.collides||this.collisionCallback||this.layer.callbacks[this.index]}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){return this.x}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){return this.x+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){return this.y}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){return this.y+this.height}}),c.Tilemap=function(a,b){this.game=a,this.key=b;var d=c.TilemapParser.parse(this.game,b);null!==d&&(this.width=d.width,this.height=d.height,this.tileWidth=d.tileWidth,this.tileHeight=d.tileHeight,this.orientation=d.orientation,this.version=d.version,this.properties=d.properties,this.widthInPixels=d.widthInPixels,this.heightInPixels=d.heightInPixels,this.layers=d.layers,this.tilesets=d.tilesets,this.tiles=d.tiles,this.objects=d.objects,this.images=d.images,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.prototype={create:function(a,b,d){for(var e=[],f=0;d>f;f++){e[f]=[];for(var g=0;b>g;g++)e[f][g]=0}this.layers.push({name:a,width:b,height:d,alpha:1,visible:!0,tileMargin:0,tileSpacing:0,format:c.Tilemap.CSV,data:e,indexes:[],dirty:!0}),this.currentLayer=this.layers.length-1},addTilesetImage:function(a,b){if("undefined"==typeof b){if("string"!=typeof a)return!1;b=a}return"string"==typeof a&&(a=this.getTilesetIndex(a)),this.tilesets[a]?(this.tilesets[a].image=this.game.cache.getImage(b),!0):!1},createFromTiles:function(a,b,c,d,e){"undefined"==typeof e&&(e=this.game.world)},createFromObjects:function(a,b,c,d,e,f,g){if("undefined"==typeof e&&(e=!0),"undefined"==typeof f&&(f=!0),"undefined"==typeof g&&(g=this.game.world),!this.objects[a])return console.warn("Tilemap.createFromObjects: Invalid objectgroup name given: "+a),void 0;for(var h,i=0,j=this.objects[a].length;j>i;i++)if(this.objects[a][i].gid===b){h=g.create(this.objects[a][i].x,this.objects[a][i].y,c,d,e),h.anchor.setTo(0,1),h.name=this.objects[a][i].name,h.visible=this.objects[a][i].visible,h.autoCull=f;for(property in this.objects[a][i].properties)g.set(h,property,this.objects[a][i].properties[property],!1,!1,0)}},createLayer:function(a,b,d,e){"undefined"==typeof b&&(b=this.game.width),"undefined"==typeof d&&(d=this.game.height),"undefined"==typeof e&&(e=this.game.world);var f=a;return"string"==typeof a&&(f=this.getLayerIndex(a)),null===f||f>this.layers.length?(console.warn("Tilemap.createLayer: Invalid layer ID given: "+f),void 0):e.add(new c.TilemapLayer(this.game,this,f,b,d))},getIndex:function(a,b){for(var c=0;ce;e++)this.layers[d].callbacks[a[e]]={callback:b,callbackContext:c}},setTileLocationCallback:function(a,b,c,d,e,f,g){if(g=this.getLayer(g),this.copy(a,b,c,d,g),!(this._results.length<2))for(var h=1;hd;d++)this.setCollisionByIndex(a[d],b,c,!1);this.calculateFaces(c)},setCollisionBetween:function(a,b,c,d){if("undefined"==typeof c&&(c=!0),d=this.getLayer(d),!(a>b)){for(var e=a;b>=e;e++)this.setCollisionByIndex(e,c,d,!1);this.calculateFaces(d)}},setCollisionByExclusion:function(a,b,c){"undefined"==typeof b&&(b=!0),c=this.getLayer(c);for(var d=0,e=this.tiles.length;e>d;d++)-1===a.indexOf(d)&&this.setCollisionByIndex(d,b,c,!1);this.calculateFaces(c)},setCollisionByIndex:function(a,b,c,d){"undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=this.currentLayer),"undefined"==typeof d&&(d=!0);for(var e=0;ef;f++)for(var h=0,i=this.layers[a].width;i>h;h++){var j=this.layers[a].data[f][h];j&&(b=this.getTileAbove(a,h,f),c=this.getTileBelow(a,h,f),d=this.getTileLeft(a,h,f),e=this.getTileRight(a,h,f),b&&b.collides&&(j.faceTop=!1),c&&c.collides&&(j.faceBottom=!1),d&&d.collides&&(j.faceLeft=!1),e&&e.collides&&(j.faceRight=!1))}},getTileAbove:function(a,b,c){return c>0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b=0&&b=0&&d=0&&a=0&&ba&&(a=0),0>b&&(b=0),c>this.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;b+d>f;f++)for(var g=a;a+c>g;g++)this._results.push(this.layers[e].data[f][g]);return this._results},paste:function(a,b,c,d){if("undefined"==typeof a&&(a=0),"undefined"==typeof b&&(b=0),d=this.getLayer(d),c&&!(c.length<2)){for(var e=a-c[1].x,f=b-c[1].y,g=1;g1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},c.Tilemap.prototype.constructor=c.Tilemap,c.TilemapLayer=function(a,d,e,f,g){this.game=a,this.map=d,this.index=e,this.layer=d.layers[e],this.canvas=c.Canvas.create(f,g),this.context=this.canvas.getContext("2d"),this.baseTexture=new b.BaseTexture(this.canvas),this.texture=new b.Texture(this.baseTexture),this.textureFrame=new c.Frame(0,0,0,f,g,"tilemapLayer",a.rnd.uuid()),c.Sprite.call(this,this.game,0,0,this.texture,this.textureFrame),this.name="",this.type=c.TILEMAPLAYER,this.fixedToCamera=!0,this.cameraOffset=new c.Point(0,0),this.tileColor="rgb(255, 255, 255)",this.debug=!1,this.debugAlpha=.5,this.debugColor="rgba(0, 255, 0, 1)",this.debugFill=!1,this.debugFillColor="rgba(0, 255, 0, 0.2)",this.debugCallbackColor="rgba(255, 0, 0, 1)",this.scrollFactorX=1,this.scrollFactorY=1,this.dirty=!0,this._cw=d.tileWidth,this._ch=d.tileHeight,this._ga=1,this._dx=0,this._dy=0,this._dw=0,this._dh=0,this._tx=0,this._ty=0,this._tw=0,this._th=0,this._tl=0,this._maxX=0,this._maxY=0,this._startX=0,this._startY=0,this._results=[],this._x=0,this._y=0,this._prevX=0,this._prevY=0,this.updateMax()},c.TilemapLayer.prototype=Object.create(c.Sprite.prototype),c.TilemapLayer.prototype=c.Utils.extend(!0,c.TilemapLayer.prototype,c.Sprite.prototype,b.Sprite.prototype),c.TilemapLayer.prototype.constructor=c.TilemapLayer,c.TilemapLayer.prototype.postUpdate=function(){c.Sprite.prototype.postUpdate.call(this),this.scrollX=this.game.camera.x*this.scrollFactorX,this.scrollY=this.game.camera.y*this.scrollFactorY,this.render()},c.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels,this.layer.heightInPixels)},c.TilemapLayer.prototype._fixX=function(a){return 0>a&&(a=0),1===this.scrollFactorX?a:this._x+(a-this._x/this.scrollFactorX)},c.TilemapLayer.prototype._unfixX=function(a){return 1===this.scrollFactorX?a:this._x/this.scrollFactorX+(a-this._x)},c.TilemapLayer.prototype._fixY=function(a){return 0>a&&(a=0),1===this.scrollFactorY?a:this._y+(a-this._y/this.scrollFactorY)},c.TilemapLayer.prototype._unfixY=function(a){return 1===this.scrollFactorY?a:this._y/this.scrollFactorY+(a-this._y)},c.TilemapLayer.prototype.getTileX=function(a){return this.game.math.snapToFloor(this._fixX(a),this.map.tileWidth)/this.map.tileWidth},c.TilemapLayer.prototype.getTileY=function(a){return this.game.math.snapToFloor(this._fixY(a),this.map.tileHeight)/this.map.tileHeight},c.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},c.TilemapLayer.prototype.getTiles=function(a,b,c,d,e){"undefined"==typeof e&&(e=!1),a=this._fixX(a),b=this._fixY(b),c>this.layer.widthInPixels&&(c=this.layer.widthInPixels),d>this.layer.heightInPixels&&(d=this.layer.heightInPixels),this._tx=this.game.math.snapToFloor(a,this._cw)/this._cw,this._ty=this.game.math.snapToFloor(b,this._ch)/this._ch,this._tw=(this.game.math.snapToCeil(c,this._cw)+this._cw)/this._cw,this._th=(this.game.math.snapToCeil(d,this._ch)+this._ch)/this._ch,this._results.length=0;for(var f=this._ty;fthis.layer.width&&(this._maxX=this.layer.width),this._maxY>this.layer.height&&(this._maxY=this.layer.height)),this.dirty=!0},c.TilemapLayer.prototype.render=function(){if(this.layer.dirty&&(this.dirty=!0),this.dirty&&this.visible){this._prevX=this._dx,this._prevY=this._dy,this._dx=-(this._x-this._startX*this.map.tileWidth),this._dy=-(this._y-this._startY*this.map.tileHeight),this._tx=this._dx,this._ty=this._dy,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=this.tileColor;var a,d;this.debug&&(this.context.globalAlpha=this.debugAlpha);for(var e=this._startY,f=this._startY+this._maxY;f>e;e++){this._column=this.layer.data[e];for(var g=this._startX,h=this._startX+this._maxX;h>g;g++)this._column[g]&&(a=this._column[g],this.map.tiles[a.index]&&(d=this.map.tilesets[this.map.tiles[a.index][2]],d.image?(this.debug===!1&&a.alpha!==this.context.globalAlpha&&(this.context.globalAlpha=a.alpha),d.tileWidth!==this.map.tileWidth||d.tileHeight!==this.map.tileHeight?this.context.drawImage(this.map.tilesets[this.map.tiles[a.index][2]].image,this.map.tiles[a.index][0],this.map.tiles[a.index][1],d.tileWidth,d.tileHeight,Math.floor(this._tx),Math.floor(this._ty)-(d.tileHeight-this.map.tileHeight),d.tileWidth,d.tileHeight):this.context.drawImage(this.map.tilesets[this.map.tiles[a.index][2]].image,this.map.tiles[a.index][0],this.map.tiles[a.index][1],this.map.tileWidth,this.map.tileHeight,Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight),a.debug&&(this.context.fillStyle="rgba(0, 255, 0, 0.4)",this.context.fillRect(Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight))):this.context.fillRect(Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight))),this._tx+=this.map.tileWidth;this._tx=this._dx,this._ty+=this.map.tileHeight}return this.debug&&(this.context.globalAlpha=1,this.renderDebug()),this.game.renderType===c.WEBGL&&b.texturesToUpdate.push(this.baseTexture),this.dirty=!1,this.layer.dirty=!1,!0}},c.TilemapLayer.prototype.renderDebug=function(){this._tx=this._dx,this._ty=this._dy,this.context.strokeStyle=this.debugColor,this.context.fillStyle=this.debugFillColor;for(var a=this._startY,b=this._startY+this._maxY;b>a;a++){this._column=this.layer.data[a];for(var c=this._startX,d=this._startX+this._maxX;d>c;c++){var e=this._column[c];e&&(e.faceTop||e.faceBottom||e.faceLeft||e.faceRight)&&(this._tx=Math.floor(this._tx),this.debugFill&&this.context.fillRect(this._tx,this._ty,this._cw,this._ch),this.context.beginPath(),e.faceTop&&(this.context.moveTo(this._tx,this._ty),this.context.lineTo(this._tx+this._cw,this._ty)),e.faceBottom&&(this.context.moveTo(this._tx,this._ty+this._ch),this.context.lineTo(this._tx+this._cw,this._ty+this._ch)),e.faceLeft&&(this.context.moveTo(this._tx,this._ty),this.context.lineTo(this._tx,this._ty+this._ch)),e.faceRight&&(this.context.moveTo(this._tx+this._cw,this._ty),this.context.lineTo(this._tx+this._cw,this._ty+this._ch)),this.context.stroke()),e&&(e.collisionCallback||e.layer.callbacks[e.index])&&(this.context.fillStyle=this.debugCallbackColor,this.context.fillRect(this._tx,this._ty,this._cw,this._ch),this.context.fillStyle=this.debugFillColor),this._tx+=this.map.tileWidth}this._tx=this._dx,this._ty+=this.map.tileHeight}},Object.defineProperty(c.TilemapLayer.prototype,"scrollX",{get:function(){return this._x},set:function(a){a!==this._x&&a>=0&&this.layer.widthInPixels>this.width&&(this._x=a,this._x>this.layer.widthInPixels-this.width&&(this._x=this.layer.widthInPixels-this.width),this._startX=this.game.math.floor(this._x/this.map.tileWidth),this._startX<0&&(this._startX=0),this._startX+this._maxX>this.layer.width&&(this._startX=this.layer.width-this._maxX),this.dirty=!0)}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollY",{get:function(){return this._y},set:function(a){a!==this._y&&a>=0&&this.layer.heightInPixels>this.height&&(this._y=a,this._y>this.layer.heightInPixels-this.height&&(this._y=this.layer.heightInPixels-this.height),this._startY=this.game.math.floor(this._y/this.map.tileHeight),this._startY<0&&(this._startY=0),this._startY+this._maxY>this.layer.height&&(this._startY=this.layer.height-this._maxY),this.dirty=!0)}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._cw},set:function(a){this._cw=a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._ch},set:function(a){this._ch=a,this.dirty=!0}}),c.TilemapParser={tileset:function(a,b,d,e,f,g,h,i,j){var k=a.cache.getTilesetImage(b);if(null===k)return console.warn("Phaser.TilemapParser.tileSet: Invalid image key given"),null;var l=k.width,m=k.height;return-1===h&&(h=Math.round(l/d)),-1===i&&(i=Math.round(m/e)),-1===j&&(j=h*i),0===l||0===m||d>l||e>m||0===j?(console.warn("Phaser.TilemapParser.tileSet: width/height zero or width/height < given tileWidth/tileHeight"),null):new c.Tileset(k,b,d,e,f,g,h,i,j)},parse:function(a,b){var d=a.cache.getTilemapData(b);return d?d.format===c.Tilemap.CSV?this.parseCSV(d.data):d.format===c.Tilemap.TILED_JSON?this.parseTiledJSON(d.data):void 0:{layers:[],objects:[],images:[],tilesets:[]}},parseCSV:function(a){a=a.trim();for(var b=[],c=a.split("\n"),d=c.length,e=0,f=0;fj;j++)a.layers[e].data[j]>0?h.push(new c.Tile(f,a.layers[e].data[j],g,i.length,a.tilewidth,a.tileheight)):h.push(null),g++,g===a.layers[e].width&&(i.push(h),g=0,h=[]);f.data=i,d.push(f)}b.layers=d;for(var l=[],e=0;eo;o++)if(a.layers[e].objects[o].gid){var p={gid:a.layers[e].objects[o].gid,name:a.layers[e].objects[o].name,x:a.layers[e].objects[o].x,y:a.layers[e].objects[o].y,visible:a.layers[e].objects[o].visible,properties:a.layers[e].objects[o].properties};n[a.layers[e].name].push(p)}}b.objects=n;for(var q=[],e=0;e0&&(b.Texture.frameUpdates.length=0)},b.CanvasRenderer.prototype.renderDisplayObject=function(a,d){var e=a.last._iNext;a=a.first;do if(a.visible||d)if(a.renderable&&0!==a.alpha){if(a instanceof b.Sprite)a.texture.frame&&(this.context.globalAlpha=a.worldAlpha,c.CANVAS_PX_ROUND?this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],Math.floor(a.worldTransform[2]),Math.floor(a.worldTransform[5])):this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),a.texture.trimmed&&this.context.transform(1,0,0,1,a.texture.trim.x,a.texture.trim.y),this.smoothProperty&&this.scaleMode!==a.texture.baseTexture.scaleMode&&(this.scaleMode=a.texture.baseTexture.scaleMode,this.context[this.smoothProperty]=this.scaleMode===b.BaseTexture.SCALE_MODE.LINEAR),this.context.drawImage(a.texture.baseTexture.source,a.texture.frame.x,a.texture.frame.y,a.texture.frame.width,a.texture.frame.height,Math.floor(a.anchor.x*-a.texture.frame.width),Math.floor(a.anchor.y*-a.texture.frame.height),a.texture.frame.width,a.texture.frame.height));else if(a instanceof b.Strip)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),this.renderStrip(a);else if(a instanceof b.TilingSprite)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),this.renderTilingSprite(a);else if(a instanceof b.CustomRenderable)a.renderCanvas(this);else if(a instanceof b.Graphics)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),b.CanvasGraphics.renderGraphics(a,this.context);else if(a instanceof b.FilterBlock)if(a.open){this.context.save();var f=a.mask.alpha,g=a.mask.worldTransform;this.context.setTransform(g[0],g[3],g[1],g[4],g[2],g[5]),a.mask.worldAlpha=.5,this.context.worldAlpha=0,b.CanvasGraphics.renderGraphicsMask(a.mask,this.context),this.context.clip(),a.mask.worldAlpha=f}else this.context.restore();a=a._iNext}else a=a._iNext;else a=a.last._iNext;while(a!=e)},b.WebGLBatch.prototype.update=function(){for(var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=0,s=this.head;s;){if(s.vcount===b.visibleCount){if(c=s.texture.frame.width,d=s.texture.frame.height,e=s.anchor.x,f=s.anchor.y,g=c*(1-e),h=c*-e,i=d*(1-f),j=d*-f,k=8*r,a=s.worldTransform,l=a[0],m=a[3],n=a[1],o=a[4],p=a[2],q=a[5],s.texture.trimmed&&(p+=s.texture.trim.x,q+=s.texture.trim.y),this.verticies[k+0]=l*h+n*j+p,this.verticies[k+1]=o*j+m*h+q,this.verticies[k+2]=l*g+n*j+p,this.verticies[k+3]=o*j+m*g+q,this.verticies[k+4]=l*g+n*i+p,this.verticies[k+5]=o*i+m*g+q,this.verticies[k+6]=l*h+n*i+p,this.verticies[k+7]=o*i+m*h+q,s.updateFrame||s.texture.updateFrame){this.dirtyUVS=!0;var t=s.texture,u=t.frame,v=t.baseTexture.width,w=t.baseTexture.height;this.uvs[k+0]=u.x/v,this.uvs[k+1]=u.y/w,this.uvs[k+2]=(u.x+u.width)/v,this.uvs[k+3]=u.y/w,this.uvs[k+4]=(u.x+u.width)/v,this.uvs[k+5]=(u.y+u.height)/w,this.uvs[k+6]=u.x/v,this.uvs[k+7]=(u.y+u.height)/w,s.updateFrame=!1}if(s.cacheAlpha!=s.worldAlpha){s.cacheAlpha=s.worldAlpha;var x=4*r;this.colors[x]=this.colors[x+1]=this.colors[x+2]=this.colors[x+3]=s.worldAlpha,this.dirtyColors=!0}}else k=8*r,this.verticies[k+0]=0,this.verticies[k+1]=0,this.verticies[k+2]=0,this.verticies[k+3]=0,this.verticies[k+4]=0,this.verticies[k+5]=0,this.verticies[k+6]=0,this.verticies[k+7]=0;r++,s=s.__next}},c}); \ No newline at end of file +},c.Particles.Arcade.Emitter.prototype=Object.create(c.Group.prototype),c.Particles.Arcade.Emitter.prototype.constructor=c.Particles.Arcade.Emitter,c.Particles.Arcade.Emitter.prototype.update=function(){if(this.on)if(this._explode){this._counter=0;do this.emitParticle(),this._counter++;while(this._counter=this._timer&&(this.emitParticle(),this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1),this._timer=this.game.time.now+this.frequency)},c.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,d,e,f){"undefined"==typeof b&&(b=0),"undefined"==typeof d&&(d=this.maxParticles),"undefined"==typeof e&&(e=!1),"undefined"==typeof f&&(f=!1);for(var g,h=0,i=a,j=b;d>h;)null===this.particleClass&&("object"==typeof a&&(i=this.game.rnd.pick(a)),"object"==typeof b&&(j=this.game.rnd.pick(b)),g=new c.Sprite(this.game,0,0,i,j)),e?(g.body.checkCollision.any=!0,g.body.checkCollision.none=!1):g.body.checkCollision.none=!0,g.body.collideWorldBounds=f,g.exists=!1,g.visible=!1,g.anchor.setTo(.5,.5),this.add(g),h++;return this},c.Particles.Arcade.Emitter.prototype.kill=function(){this.on=!1,this.alive=!1,this.exists=!1},c.Particles.Arcade.Emitter.prototype.revive=function(){this.alive=!0,this.exists=!0},c.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d){"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=250),"undefined"==typeof d&&(d=0),this.revive(),this.visible=!0,this.on=!0,this._explode=a,this.lifespan=b,this.frequency=c,a?this._quantity=d:this._quantity+=d,this._counter=0,this._timer=this.game.time.now+c},c.Particles.Arcade.Emitter.prototype.emitParticle=function(){var a=this.getFirstExists(!1);if(null!=a){if(this.width>1||this.height>1?a.reset(this.game.rnd.integerInRange(this.left,this.right),this.game.rnd.integerInRange(this.top,this.bottom)):a.reset(this.emitX,this.emitY),a.lifespan=this.lifespan,a.body.bounce.setTo(this.bounce.x,this.bounce.y),a.body.velocity.x=this.minParticleSpeed.x!=this.maxParticleSpeed.x?this.game.rnd.integerInRange(this.minParticleSpeed.x,this.maxParticleSpeed.x):this.minParticleSpeed.x,a.body.velocity.y=this.minParticleSpeed.y!=this.maxParticleSpeed.y?this.game.rnd.integerInRange(this.minParticleSpeed.y,this.maxParticleSpeed.y):this.minParticleSpeed.y,a.body.gravity.y=this.gravity,a.body.angularVelocity=this.minRotation!=this.maxRotation?this.game.rnd.integerInRange(this.minRotation,this.maxRotation):this.minRotation,1!==this.minParticleScale||1!==this.maxParticleScale){var b=this.game.rnd.realInRange(this.minParticleScale,this.maxParticleScale);a.scale.setTo(b,b)}a.body.friction=this.particleFriction,a.body.angularDrag=this.angularDrag}},c.Particles.Arcade.Emitter.prototype.setSize=function(a,b){this.width=a,this.height=b},c.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b},c.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b},c.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b},c.Particles.Arcade.Emitter.prototype.at=function(a){a.center&&(this.emitX=a.center.x,this.emitY=a.center.y)},Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"alpha",{get:function(){return this._container.alpha},set:function(a){this._container.alpha=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"visible",{get:function(){return this._container.visible},set:function(a){this._container.visible=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.height/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.height/2)}}),c.Tile=function(a,b,c,d,e,f){this.layer=a,this.index=b,this.x=c,this.y=d,this.width=e,this.height=f,this.alpha=1,this.properties={},this.scanned=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this.collides=!1,this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.callback=null,this.callbackContext=this},c.Tile.prototype={setCollisionCallback:function(a,b){this.collisionCallbackContext=b,this.collisionCallback=a},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.collideNone=a||b||c||d?!1:!0},resetCollision:function(){this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collides=a.collides,this.collideNone=a.collideNone,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){return this.collides||this.collisionCallback||this.layer.callbacks[this.index]}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){return this.x}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){return this.x+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){return this.y}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){return this.y+this.height}}),c.Tilemap=function(a,b){this.game=a,this.key=b;var d=c.TilemapParser.parse(this.game,b);null!==d&&(this.width=d.width,this.height=d.height,this.tileWidth=d.tileWidth,this.tileHeight=d.tileHeight,this.orientation=d.orientation,this.version=d.version,this.properties=d.properties,this.widthInPixels=d.widthInPixels,this.heightInPixels=d.heightInPixels,this.layers=d.layers,this.tilesets=d.tilesets,this.tiles=d.tiles,this.objects=d.objects,this.images=d.images,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.prototype={create:function(a,b,d){for(var e=[],f=0;d>f;f++){e[f]=[];for(var g=0;b>g;g++)e[f][g]=0}this.layers.push({name:a,width:b,height:d,alpha:1,visible:!0,tileMargin:0,tileSpacing:0,format:c.Tilemap.CSV,data:e,indexes:[],dirty:!0}),this.currentLayer=this.layers.length-1},addTilesetImage:function(a,b){if("undefined"==typeof b){if("string"!=typeof a)return!1;b=a}return"string"==typeof a&&(a=this.getTilesetIndex(a)),this.tilesets[a]?(this.tilesets[a].image=this.game.cache.getImage(b),!0):!1},createFromObjects:function(a,b,c,d,e,f,g){if("undefined"==typeof e&&(e=!0),"undefined"==typeof f&&(f=!0),"undefined"==typeof g&&(g=this.game.world),!this.objects[a])return console.warn("Tilemap.createFromObjects: Invalid objectgroup name given: "+a),void 0;for(var h,i=0,j=this.objects[a].length;j>i;i++)if(this.objects[a][i].gid===b){h=g.create(this.objects[a][i].x,this.objects[a][i].y,c,d,e),h.anchor.setTo(0,1),h.name=this.objects[a][i].name,h.visible=this.objects[a][i].visible,h.autoCull=f;for(property in this.objects[a][i].properties)g.set(h,property,this.objects[a][i].properties[property],!1,!1,0)}},createLayer:function(a,b,d,e){"undefined"==typeof b&&(b=this.game.width),"undefined"==typeof d&&(d=this.game.height),"undefined"==typeof e&&(e=this.game.world);var f=a;return"string"==typeof a&&(f=this.getLayerIndex(a)),null===f||f>this.layers.length?(console.warn("Tilemap.createLayer: Invalid layer ID given: "+f),void 0):e.add(new c.TilemapLayer(this.game,this,f,b,d))},getIndex:function(a,b){for(var c=0;ce;e++)this.layers[d].callbacks[a[e]]={callback:b,callbackContext:c}},setTileLocationCallback:function(a,b,c,d,e,f,g){if(g=this.getLayer(g),this.copy(a,b,c,d,g),!(this._results.length<2))for(var h=1;hd;d++)this.setCollisionByIndex(a[d],b,c,!1);this.calculateFaces(c)},setCollisionBetween:function(a,b,c,d){if("undefined"==typeof c&&(c=!0),d=this.getLayer(d),!(a>b)){for(var e=a;b>=e;e++)this.setCollisionByIndex(e,c,d,!1);this.calculateFaces(d)}},setCollisionByExclusion:function(a,b,c){"undefined"==typeof b&&(b=!0),c=this.getLayer(c);for(var d=0,e=this.tiles.length;e>d;d++)-1===a.indexOf(d)&&this.setCollisionByIndex(d,b,c,!1);this.calculateFaces(c)},setCollisionByIndex:function(a,b,c,d){"undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=this.currentLayer),"undefined"==typeof d&&(d=!0);for(var e=0;ef;f++)for(var h=0,i=this.layers[a].width;i>h;h++){var j=this.layers[a].data[f][h];j&&(b=this.getTileAbove(a,h,f),c=this.getTileBelow(a,h,f),d=this.getTileLeft(a,h,f),e=this.getTileRight(a,h,f),b&&b.collides&&(j.faceTop=!1),c&&c.collides&&(j.faceBottom=!1),d&&d.collides&&(j.faceLeft=!1),e&&e.collides&&(j.faceRight=!1))}},getTileAbove:function(a,b,c){return c>0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b=0&&b=0&&d=0&&a=0&&ba&&(a=0),0>b&&(b=0),c>this.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;b+d>f;f++)for(var g=a;a+c>g;g++)this._results.push(this.layers[e].data[f][g]);return this._results},paste:function(a,b,c,d){if("undefined"==typeof a&&(a=0),"undefined"==typeof b&&(b=0),d=this.getLayer(d),c&&!(c.length<2)){for(var e=a-c[1].x,f=b-c[1].y,g=1;g1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},c.Tilemap.prototype.constructor=c.Tilemap,c.TilemapLayer=function(a,d,e,f,g){this.game=a,this.map=d,this.index=e,this.layer=d.layers[e],this.canvas=c.Canvas.create(f,g),this.context=this.canvas.getContext("2d"),this.baseTexture=new b.BaseTexture(this.canvas),this.texture=new b.Texture(this.baseTexture),this.textureFrame=new c.Frame(0,0,0,f,g,"tilemapLayer",a.rnd.uuid()),c.Sprite.call(this,this.game,0,0,this.texture,this.textureFrame),this.name="",this.type=c.TILEMAPLAYER,this.fixedToCamera=!0,this.cameraOffset=new c.Point(0,0),this.tileColor="rgb(255, 255, 255)",this.debug=!1,this.debugAlpha=.5,this.debugColor="rgba(0, 255, 0, 1)",this.debugFill=!1,this.debugFillColor="rgba(0, 255, 0, 0.2)",this.debugCallbackColor="rgba(255, 0, 0, 1)",this.scrollFactorX=1,this.scrollFactorY=1,this.dirty=!0,this._cw=d.tileWidth,this._ch=d.tileHeight,this._ga=1,this._dx=0,this._dy=0,this._dw=0,this._dh=0,this._tx=0,this._ty=0,this._tw=0,this._th=0,this._tl=0,this._maxX=0,this._maxY=0,this._startX=0,this._startY=0,this._results=[],this._x=0,this._y=0,this._prevX=0,this._prevY=0,this.updateMax()},c.TilemapLayer.prototype=Object.create(c.Sprite.prototype),c.TilemapLayer.prototype=c.Utils.extend(!0,c.TilemapLayer.prototype,c.Sprite.prototype,b.Sprite.prototype),c.TilemapLayer.prototype.constructor=c.TilemapLayer,c.TilemapLayer.prototype.postUpdate=function(){c.Sprite.prototype.postUpdate.call(this),this.scrollX=this.game.camera.x*this.scrollFactorX,this.scrollY=this.game.camera.y*this.scrollFactorY,this.render()},c.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels,this.layer.heightInPixels)},c.TilemapLayer.prototype._fixX=function(a){return 0>a&&(a=0),1===this.scrollFactorX?a:this._x+(a-this._x/this.scrollFactorX)},c.TilemapLayer.prototype._unfixX=function(a){return 1===this.scrollFactorX?a:this._x/this.scrollFactorX+(a-this._x)},c.TilemapLayer.prototype._fixY=function(a){return 0>a&&(a=0),1===this.scrollFactorY?a:this._y+(a-this._y/this.scrollFactorY)},c.TilemapLayer.prototype._unfixY=function(a){return 1===this.scrollFactorY?a:this._y/this.scrollFactorY+(a-this._y)},c.TilemapLayer.prototype.getTileX=function(a){return this.game.math.snapToFloor(this._fixX(a),this.map.tileWidth)/this.map.tileWidth},c.TilemapLayer.prototype.getTileY=function(a){return this.game.math.snapToFloor(this._fixY(a),this.map.tileHeight)/this.map.tileHeight},c.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},c.TilemapLayer.prototype.getTiles=function(a,b,c,d,e){"undefined"==typeof e&&(e=!1),a=this._fixX(a),b=this._fixY(b),c>this.layer.widthInPixels&&(c=this.layer.widthInPixels),d>this.layer.heightInPixels&&(d=this.layer.heightInPixels),this._tx=this.game.math.snapToFloor(a,this._cw)/this._cw,this._ty=this.game.math.snapToFloor(b,this._ch)/this._ch,this._tw=(this.game.math.snapToCeil(c,this._cw)+this._cw)/this._cw,this._th=(this.game.math.snapToCeil(d,this._ch)+this._ch)/this._ch,this._results.length=0;for(var f=this._ty;fthis.layer.width&&(this._maxX=this.layer.width),this._maxY>this.layer.height&&(this._maxY=this.layer.height)),this.dirty=!0},c.TilemapLayer.prototype.render=function(){if(this.layer.dirty&&(this.dirty=!0),this.dirty&&this.visible){this._prevX=this._dx,this._prevY=this._dy,this._dx=-(this._x-this._startX*this.map.tileWidth),this._dy=-(this._y-this._startY*this.map.tileHeight),this._tx=this._dx,this._ty=this._dy,this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=this.tileColor;var a,d;this.debug&&(this.context.globalAlpha=this.debugAlpha);for(var e=this._startY,f=this._startY+this._maxY;f>e;e++){this._column=this.layer.data[e];for(var g=this._startX,h=this._startX+this._maxX;h>g;g++)this._column[g]&&(a=this._column[g],this.map.tiles[a.index]&&(d=this.map.tilesets[this.map.tiles[a.index][2]],d.image?(this.debug===!1&&a.alpha!==this.context.globalAlpha&&(this.context.globalAlpha=a.alpha),d.tileWidth!==this.map.tileWidth||d.tileHeight!==this.map.tileHeight?this.context.drawImage(this.map.tilesets[this.map.tiles[a.index][2]].image,this.map.tiles[a.index][0],this.map.tiles[a.index][1],d.tileWidth,d.tileHeight,Math.floor(this._tx),Math.floor(this._ty)-(d.tileHeight-this.map.tileHeight),d.tileWidth,d.tileHeight):this.context.drawImage(this.map.tilesets[this.map.tiles[a.index][2]].image,this.map.tiles[a.index][0],this.map.tiles[a.index][1],this.map.tileWidth,this.map.tileHeight,Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight),a.debug&&(this.context.fillStyle="rgba(0, 255, 0, 0.4)",this.context.fillRect(Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight))):this.context.fillRect(Math.floor(this._tx),Math.floor(this._ty),this.map.tileWidth,this.map.tileHeight))),this._tx+=this.map.tileWidth;this._tx=this._dx,this._ty+=this.map.tileHeight}return this.debug&&(this.context.globalAlpha=1,this.renderDebug()),this.game.renderType===c.WEBGL&&b.texturesToUpdate.push(this.baseTexture),this.dirty=!1,this.layer.dirty=!1,!0}},c.TilemapLayer.prototype.renderDebug=function(){this._tx=this._dx,this._ty=this._dy,this.context.strokeStyle=this.debugColor,this.context.fillStyle=this.debugFillColor;for(var a=this._startY,b=this._startY+this._maxY;b>a;a++){this._column=this.layer.data[a];for(var c=this._startX,d=this._startX+this._maxX;d>c;c++){var e=this._column[c];e&&(e.faceTop||e.faceBottom||e.faceLeft||e.faceRight)&&(this._tx=Math.floor(this._tx),this.debugFill&&this.context.fillRect(this._tx,this._ty,this._cw,this._ch),this.context.beginPath(),e.faceTop&&(this.context.moveTo(this._tx,this._ty),this.context.lineTo(this._tx+this._cw,this._ty)),e.faceBottom&&(this.context.moveTo(this._tx,this._ty+this._ch),this.context.lineTo(this._tx+this._cw,this._ty+this._ch)),e.faceLeft&&(this.context.moveTo(this._tx,this._ty),this.context.lineTo(this._tx,this._ty+this._ch)),e.faceRight&&(this.context.moveTo(this._tx+this._cw,this._ty),this.context.lineTo(this._tx+this._cw,this._ty+this._ch)),this.context.stroke()),e&&(e.collisionCallback||e.layer.callbacks[e.index])&&(this.context.fillStyle=this.debugCallbackColor,this.context.fillRect(this._tx,this._ty,this._cw,this._ch),this.context.fillStyle=this.debugFillColor),this._tx+=this.map.tileWidth}this._tx=this._dx,this._ty+=this.map.tileHeight}},Object.defineProperty(c.TilemapLayer.prototype,"scrollX",{get:function(){return this._x},set:function(a){a!==this._x&&a>=0&&this.layer.widthInPixels>this.width&&(this._x=a,this._x>this.layer.widthInPixels-this.width&&(this._x=this.layer.widthInPixels-this.width),this._startX=this.game.math.floor(this._x/this.map.tileWidth),this._startX<0&&(this._startX=0),this._startX+this._maxX>this.layer.width&&(this._startX=this.layer.width-this._maxX),this.dirty=!0)}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollY",{get:function(){return this._y},set:function(a){a!==this._y&&a>=0&&this.layer.heightInPixels>this.height&&(this._y=a,this._y>this.layer.heightInPixels-this.height&&(this._y=this.layer.heightInPixels-this.height),this._startY=this.game.math.floor(this._y/this.map.tileHeight),this._startY<0&&(this._startY=0),this._startY+this._maxY>this.layer.height&&(this._startY=this.layer.height-this._maxY),this.dirty=!0)}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._cw},set:function(a){this._cw=a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._ch},set:function(a){this._ch=a,this.dirty=!0}}),c.TilemapParser={tileset:function(a,b,d,e,f,g,h,i,j){var k=a.cache.getTilesetImage(b);if(null===k)return console.warn("Phaser.TilemapParser.tileSet: Invalid image key given"),null;var l=k.width,m=k.height;return-1===h&&(h=Math.round(l/d)),-1===i&&(i=Math.round(m/e)),-1===j&&(j=h*i),0===l||0===m||d>l||e>m||0===j?(console.warn("Phaser.TilemapParser.tileSet: width/height zero or width/height < given tileWidth/tileHeight"),null):new c.Tileset(k,b,d,e,f,g,h,i,j)},parse:function(a,b){var d=a.cache.getTilemapData(b);return d?d.format===c.Tilemap.CSV?this.parseCSV(d.data):d.format===c.Tilemap.TILED_JSON?this.parseTiledJSON(d.data):void 0:{layers:[],objects:[],images:[],tilesets:[]}},parseCSV:function(a){a=a.trim();for(var b=[],c=a.split("\n"),d=c.length,e=0,f=0;fj;j++)a.layers[e].data[j]>0?h.push(new c.Tile(f,a.layers[e].data[j],g,i.length,a.tilewidth,a.tileheight)):h.push(null),g++,g===a.layers[e].width&&(i.push(h),g=0,h=[]);f.data=i,d.push(f)}b.layers=d;for(var l=[],e=0;eo;o++)if(a.layers[e].objects[o].gid){var p={gid:a.layers[e].objects[o].gid,name:a.layers[e].objects[o].name,x:a.layers[e].objects[o].x,y:a.layers[e].objects[o].y,visible:a.layers[e].objects[o].visible,properties:a.layers[e].objects[o].properties};n[a.layers[e].name].push(p)}}b.objects=n;for(var q=[],e=0;e0&&(b.Texture.frameUpdates.length=0)},b.CanvasRenderer.prototype.renderDisplayObject=function(a,d){var e=a.last._iNext;a=a.first;do if(a.visible||d)if(a.renderable&&0!==a.alpha){if(a instanceof b.Sprite)a.texture.frame&&(this.context.globalAlpha=a.worldAlpha,c.CANVAS_PX_ROUND?this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],Math.floor(a.worldTransform[2]),Math.floor(a.worldTransform[5])):this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),a.texture.trimmed&&this.context.transform(1,0,0,1,a.texture.trim.x,a.texture.trim.y),this.smoothProperty&&this.scaleMode!==a.texture.baseTexture.scaleMode&&(this.scaleMode=a.texture.baseTexture.scaleMode,this.context[this.smoothProperty]=this.scaleMode===b.BaseTexture.SCALE_MODE.LINEAR),this.context.drawImage(a.texture.baseTexture.source,a.texture.frame.x,a.texture.frame.y,a.texture.frame.width,a.texture.frame.height,Math.floor(a.anchor.x*-a.texture.frame.width),Math.floor(a.anchor.y*-a.texture.frame.height),a.texture.frame.width,a.texture.frame.height));else if(a instanceof b.Strip)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),this.renderStrip(a);else if(a instanceof b.TilingSprite)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),this.renderTilingSprite(a);else if(a instanceof b.CustomRenderable)a.renderCanvas(this);else if(a instanceof b.Graphics)this.context.setTransform(a.worldTransform[0],a.worldTransform[3],a.worldTransform[1],a.worldTransform[4],a.worldTransform[2],a.worldTransform[5]),b.CanvasGraphics.renderGraphics(a,this.context);else if(a instanceof b.FilterBlock)if(a.open){this.context.save();var f=a.mask.alpha,g=a.mask.worldTransform;this.context.setTransform(g[0],g[3],g[1],g[4],g[2],g[5]),a.mask.worldAlpha=.5,this.context.worldAlpha=0,b.CanvasGraphics.renderGraphicsMask(a.mask,this.context),this.context.clip(),a.mask.worldAlpha=f}else this.context.restore();a=a._iNext}else a=a._iNext;else a=a.last._iNext;while(a!=e)},b.WebGLBatch.prototype.update=function(){for(var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=0,s=this.head;s;){if(s.vcount===b.visibleCount){if(c=s.texture.frame.width,d=s.texture.frame.height,e=s.anchor.x,f=s.anchor.y,g=c*(1-e),h=c*-e,i=d*(1-f),j=d*-f,k=8*r,a=s.worldTransform,l=a[0],m=a[3],n=a[1],o=a[4],p=a[2],q=a[5],s.texture.trimmed&&(p+=s.texture.trim.x,q+=s.texture.trim.y),this.verticies[k+0]=l*h+n*j+p,this.verticies[k+1]=o*j+m*h+q,this.verticies[k+2]=l*g+n*j+p,this.verticies[k+3]=o*j+m*g+q,this.verticies[k+4]=l*g+n*i+p,this.verticies[k+5]=o*i+m*g+q,this.verticies[k+6]=l*h+n*i+p,this.verticies[k+7]=o*i+m*h+q,s.updateFrame||s.texture.updateFrame){this.dirtyUVS=!0;var t=s.texture,u=t.frame,v=t.baseTexture.width,w=t.baseTexture.height;this.uvs[k+0]=u.x/v,this.uvs[k+1]=u.y/w,this.uvs[k+2]=(u.x+u.width)/v,this.uvs[k+3]=u.y/w,this.uvs[k+4]=(u.x+u.width)/v,this.uvs[k+5]=(u.y+u.height)/w,this.uvs[k+6]=u.x/v,this.uvs[k+7]=(u.y+u.height)/w,s.updateFrame=!1}if(s.cacheAlpha!=s.worldAlpha){s.cacheAlpha=s.worldAlpha;var x=4*r;this.colors[x]=this.colors[x+1]=this.colors[x+2]=this.colors[x+3]=s.worldAlpha,this.dirtyColors=!0}}else k=8*r,this.verticies[k+0]=0,this.verticies[k+1]=0,this.verticies[k+2]=0,this.verticies[k+3]=0,this.verticies[k+4]=0,this.verticies[k+5]=0,this.verticies[k+6]=0,this.verticies[k+7]=0;r++,s=s.__next}},c}); \ No newline at end of file diff --git a/docs/Animation.js.html b/docs/Animation.js.html index 04471bfd..c1e428d4 100644 --- a/docs/Animation.js.html +++ b/docs/Animation.js.html @@ -923,7 +923,7 @@ Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zer Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/AnimationManager.js.html b/docs/AnimationManager.js.html index 8f6abbbf..252648c5 100644 --- a/docs/AnimationManager.js.html +++ b/docs/AnimationManager.js.html @@ -879,7 +879,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameName', { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/AnimationParser.js.html b/docs/AnimationParser.js.html index ef968e66..a3eb1ecd 100644 --- a/docs/AnimationParser.js.html +++ b/docs/AnimationParser.js.html @@ -777,7 +777,7 @@ Phaser.AnimationParser = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/ArcadePhysics.js.html b/docs/ArcadePhysics.js.html index 52ea1b12..f0ee8385 100644 --- a/docs/ArcadePhysics.js.html +++ b/docs/ArcadePhysics.js.html @@ -1881,7 +1881,7 @@ Phaser.Physics.Arcade.prototype.constructor = Phaser.Physics.Arcade; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/BitmapData.js.html b/docs/BitmapData.js.html index f79e0edc..b1890364 100644 --- a/docs/BitmapData.js.html +++ b/docs/BitmapData.js.html @@ -1570,7 +1570,7 @@ Phaser.BitmapData.prototype.de = Phaser.BitmapData.prototype.ellipse; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/BitmapText.js.html b/docs/BitmapText.js.html index 168c0d81..f65dd0cf 100644 --- a/docs/BitmapText.js.html +++ b/docs/BitmapText.js.html @@ -683,7 +683,7 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'y', { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Body.js.html b/docs/Body.js.html index a8ee0511..becdc5da 100644 --- a/docs/Body.js.html +++ b/docs/Body.js.html @@ -1991,7 +1991,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "y", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Button.js.html b/docs/Button.js.html index e4849396..b5f84c51 100644 --- a/docs/Button.js.html +++ b/docs/Button.js.html @@ -1085,7 +1085,7 @@ Phaser.Button.prototype.setState = function (newState) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Cache.js.html b/docs/Cache.js.html index 4e6cf044..a8c30c30 100644 --- a/docs/Cache.js.html +++ b/docs/Cache.js.html @@ -1299,7 +1299,7 @@ Phaser.Cache.prototype.constructor = Phaser.Cache; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Camera.js.html b/docs/Camera.js.html index 23c35a11..32e99f94 100644 --- a/docs/Camera.js.html +++ b/docs/Camera.js.html @@ -867,7 +867,7 @@ Object.defineProperty(Phaser.Camera.prototype, "height", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Canvas.js.html b/docs/Canvas.js.html index 39d54a49..c2580731 100644 --- a/docs/Canvas.js.html +++ b/docs/Canvas.js.html @@ -736,7 +736,7 @@ Phaser.Canvas = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Circle.js.html b/docs/Circle.js.html index ff3bf89c..03a41edc 100644 --- a/docs/Circle.js.html +++ b/docs/Circle.js.html @@ -927,7 +927,7 @@ Phaser.Circle.intersectsRectangle = function (c, r) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Color.js.html b/docs/Color.js.html index b77c0d4a..3ee6ff8f 100644 --- a/docs/Color.js.html +++ b/docs/Color.js.html @@ -801,7 +801,7 @@ Phaser.Color = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/DOMSprite.js.html b/docs/DOMSprite.js.html index 280e7846..9cdc454f 100644 --- a/docs/DOMSprite.js.html +++ b/docs/DOMSprite.js.html @@ -538,7 +538,7 @@ Phaser.DOMSprite = function (game, element, x, y, style) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Debug.js.html b/docs/Debug.js.html index 0d79de7a..1bef645a 100644 --- a/docs/Debug.js.html +++ b/docs/Debug.js.html @@ -1371,7 +1371,7 @@ Phaser.Utils.Debug.prototype.constructor = Phaser.Utils.Debug; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Device.js.html b/docs/Device.js.html index 5dc8ea61..fc02c8ae 100644 --- a/docs/Device.js.html +++ b/docs/Device.js.html @@ -1129,7 +1129,7 @@ Phaser.Device.prototype.constructor = Phaser.Device; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Easing.js.html b/docs/Easing.js.html index fd3c9954..1edec75c 100644 --- a/docs/Easing.js.html +++ b/docs/Easing.js.html @@ -1013,7 +1013,7 @@ Phaser.Easing = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Emitter.js.html b/docs/Emitter.js.html index ffced60a..b6e3f4c5 100644 --- a/docs/Emitter.js.html +++ b/docs/Emitter.js.html @@ -1084,7 +1084,7 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Events.js.html b/docs/Events.js.html index 7f5b0ddd..24d1a03f 100644 --- a/docs/Events.js.html +++ b/docs/Events.js.html @@ -532,7 +532,7 @@ Phaser.Events.prototype.constructor = Phaser.Events; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Filter.js.html b/docs/Filter.js.html index 24f2ded5..dae1dee6 100644 --- a/docs/Filter.js.html +++ b/docs/Filter.js.html @@ -609,7 +609,7 @@ Object.defineProperty(Phaser.Filter.prototype, 'height', { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Frame.js.html b/docs/Frame.js.html index 72409cec..6b466af1 100644 --- a/docs/Frame.js.html +++ b/docs/Frame.js.html @@ -612,7 +612,7 @@ Phaser.Frame.prototype.constructor = Phaser.Frame; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/FrameData.js.html b/docs/FrameData.js.html index 76721313..201a26df 100644 --- a/docs/FrameData.js.html +++ b/docs/FrameData.js.html @@ -689,7 +689,7 @@ Object.defineProperty(Phaser.FrameData.prototype, "total", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Game.js.html b/docs/Game.js.html index a353dfff..c7bb6092 100644 --- a/docs/Game.js.html +++ b/docs/Game.js.html @@ -1194,7 +1194,7 @@ Object.defineProperty(Phaser.Game.prototype, "paused", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/GameObjectFactory.js.html b/docs/GameObjectFactory.js.html index d4836198..7a296bf3 100644 --- a/docs/GameObjectFactory.js.html +++ b/docs/GameObjectFactory.js.html @@ -773,7 +773,7 @@ Phaser.GameObjectFactory.prototype.constructor = Phaser.GameObjectFactory; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Gamepad.js.html b/docs/Gamepad.js.html index ba480d0d..da72bcfd 100644 --- a/docs/Gamepad.js.html +++ b/docs/Gamepad.js.html @@ -1028,7 +1028,7 @@ Phaser.Gamepad.XBOX360_STICK_RIGHT_Y = 3; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/GamepadButton.js.html b/docs/GamepadButton.js.html index 822fdafa..83b8cda0 100644 --- a/docs/GamepadButton.js.html +++ b/docs/GamepadButton.js.html @@ -625,7 +625,7 @@ Phaser.GamepadButton.prototype.constructor = Phaser.GamepadButton; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Graphics.js.html b/docs/Graphics.js.html index 264be416..033154fc 100644 --- a/docs/Graphics.js.html +++ b/docs/Graphics.js.html @@ -554,7 +554,7 @@ Object.defineProperty(Phaser.Graphics.prototype, 'y', { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Group.js.html b/docs/Group.js.html index 5bddfa85..fffa6608 100644 --- a/docs/Group.js.html +++ b/docs/Group.js.html @@ -2057,7 +2057,7 @@ Object.defineProperty(Phaser.Group.prototype, "alpha", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Input.js.html b/docs/Input.js.html index d01fb7a1..4f07826d 100644 --- a/docs/Input.js.html +++ b/docs/Input.js.html @@ -1294,7 +1294,7 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/InputHandler.js.html b/docs/InputHandler.js.html index b2fa978b..c8e9005c 100644 --- a/docs/InputHandler.js.html +++ b/docs/InputHandler.js.html @@ -1628,7 +1628,7 @@ Phaser.InputHandler.prototype.constructor = Phaser.InputHandler; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Key.js.html b/docs/Key.js.html index da455462..c426804f 100644 --- a/docs/Key.js.html +++ b/docs/Key.js.html @@ -623,7 +623,7 @@ Phaser.Key.prototype.constructor = Phaser.Key; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Keyboard.js.html b/docs/Keyboard.js.html index c59ae5d4..a0f6c5d3 100644 --- a/docs/Keyboard.js.html +++ b/docs/Keyboard.js.html @@ -947,7 +947,7 @@ Phaser.Keyboard.NUM_LOCK = 144; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Line.js.html b/docs/Line.js.html index 5bc257ba..2c27aeb3 100644 --- a/docs/Line.js.html +++ b/docs/Line.js.html @@ -714,7 +714,7 @@ Phaser.Line.intersects = function (a, b, asSegment, result) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/LinkedList.js.html b/docs/LinkedList.js.html index 18a2d13b..00d78e04 100644 --- a/docs/LinkedList.js.html +++ b/docs/LinkedList.js.html @@ -606,7 +606,7 @@ Phaser.LinkedList.prototype.constructor = Phaser.LinkedList; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Loader.js.html b/docs/Loader.js.html index 64627875..71b1400b 100644 --- a/docs/Loader.js.html +++ b/docs/Loader.js.html @@ -1763,7 +1763,7 @@ Phaser.Loader.prototype.constructor = Phaser.Loader; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/LoaderParser.js.html b/docs/LoaderParser.js.html index 08d3d53d..17a01951 100644 --- a/docs/LoaderParser.js.html +++ b/docs/LoaderParser.js.html @@ -532,7 +532,7 @@ Phaser.LoaderParser = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/MSPointer.js.html b/docs/MSPointer.js.html index bda5f9f6..d8cc9893 100644 --- a/docs/MSPointer.js.html +++ b/docs/MSPointer.js.html @@ -620,7 +620,7 @@ Phaser.MSPointer.prototype.constructor = Phaser.MSPointer; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Math.js.html b/docs/Math.js.html index 7881a87c..13551c1a 100644 --- a/docs/Math.js.html +++ b/docs/Math.js.html @@ -1769,7 +1769,7 @@ Phaser.Math = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Mouse.js.html b/docs/Mouse.js.html index bc3918f1..fdcd270d 100644 --- a/docs/Mouse.js.html +++ b/docs/Mouse.js.html @@ -781,7 +781,7 @@ Phaser.Mouse.prototype.constructor = Phaser.Mouse; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Net.js.html b/docs/Net.js.html index 05b445ac..bb7fb71a 100644 --- a/docs/Net.js.html +++ b/docs/Net.js.html @@ -616,7 +616,7 @@ Phaser.Net.prototype.constructor = Phaser.Net; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Particles.js.html b/docs/Particles.js.html index 4616af87..be2290be 100644 --- a/docs/Particles.js.html +++ b/docs/Particles.js.html @@ -531,7 +531,7 @@ Phaser.Particles.prototype.constructor = Phaser.Particles; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Animation.html b/docs/Phaser.Animation.html index eeaea794..b28d10d2 100644 --- a/docs/Phaser.Animation.html +++ b/docs/Phaser.Animation.html @@ -2926,7 +2926,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.AnimationManager.html b/docs/Phaser.AnimationManager.html index 17b56378..e52866be 100644 --- a/docs/Phaser.AnimationManager.html +++ b/docs/Phaser.AnimationManager.html @@ -2973,7 +2973,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.AnimationParser.html b/docs/Phaser.AnimationParser.html index c4f2c13d..735bd66a 100644 --- a/docs/Phaser.AnimationParser.html +++ b/docs/Phaser.AnimationParser.html @@ -1494,7 +1494,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.BitmapData.html b/docs/Phaser.BitmapData.html index 8d277a14..f3e5ed33 100644 --- a/docs/Phaser.BitmapData.html +++ b/docs/Phaser.BitmapData.html @@ -11953,7 +11953,7 @@ the stroke style and color in a single line of code like so:

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.BitmapText.html b/docs/Phaser.BitmapText.html index c29dc7e6..c1f97e96 100644 --- a/docs/Phaser.BitmapText.html +++ b/docs/Phaser.BitmapText.html @@ -1921,7 +1921,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Button.html b/docs/Phaser.Button.html index 61b45d45..3d093874 100644 --- a/docs/Phaser.Button.html +++ b/docs/Phaser.Button.html @@ -4525,7 +4525,7 @@ Call this function with no parameters at all to reset all sounds on this Button. Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Cache.html b/docs/Phaser.Cache.html index 7385e6ef..a3249c86 100644 --- a/docs/Phaser.Cache.html +++ b/docs/Phaser.Cache.html @@ -7066,7 +7066,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Camera.html b/docs/Phaser.Camera.html index 95dc6864..2e2305f1 100644 --- a/docs/Phaser.Camera.html +++ b/docs/Phaser.Camera.html @@ -3443,7 +3443,7 @@ without having to use game.camera.x and game.camera.y.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:38 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Canvas.html b/docs/Phaser.Canvas.html index 1855047e..096ddd32 100644 --- a/docs/Phaser.Canvas.html +++ b/docs/Phaser.Canvas.html @@ -2638,7 +2638,7 @@ patchy on earlier browsers, especially on mobile.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:13 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Circle.html b/docs/Phaser.Circle.html index fb1fd9ec..9e9df98f 100644 --- a/docs/Phaser.Circle.html +++ b/docs/Phaser.Circle.html @@ -4316,7 +4316,7 @@ This method checks the radius distances between the two Circle objects to see if Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Color.html b/docs/Phaser.Color.html index 9d2fea8d..e22db5d8 100644 --- a/docs/Phaser.Color.html +++ b/docs/Phaser.Color.html @@ -3625,7 +3625,7 @@ Set the max value to restrict the maximum color used per channel.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.DOMSprite.html b/docs/Phaser.DOMSprite.html index f5fbc88b..75566e48 100644 --- a/docs/Phaser.DOMSprite.html +++ b/docs/Phaser.DOMSprite.html @@ -1443,7 +1443,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Device.html b/docs/Phaser.Device.html index 5da32c64..8d430f4a 100644 --- a/docs/Phaser.Device.html +++ b/docs/Phaser.Device.html @@ -6051,7 +6051,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Back.html b/docs/Phaser.Easing.Back.html index cff8df87..a72423f3 100644 --- a/docs/Phaser.Easing.Back.html +++ b/docs/Phaser.Easing.Back.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Bounce.html b/docs/Phaser.Easing.Bounce.html index 82520e9b..50dea5a9 100644 --- a/docs/Phaser.Easing.Bounce.html +++ b/docs/Phaser.Easing.Bounce.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Circular.html b/docs/Phaser.Easing.Circular.html index 759e7bf0..792b1ac0 100644 --- a/docs/Phaser.Easing.Circular.html +++ b/docs/Phaser.Easing.Circular.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Cubic.html b/docs/Phaser.Easing.Cubic.html index c65da4c7..e9513bde 100644 --- a/docs/Phaser.Easing.Cubic.html +++ b/docs/Phaser.Easing.Cubic.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Elastic.html b/docs/Phaser.Easing.Elastic.html index 7ba1cf15..69d3cdd6 100644 --- a/docs/Phaser.Easing.Elastic.html +++ b/docs/Phaser.Easing.Elastic.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Exponential.html b/docs/Phaser.Easing.Exponential.html index 8b3e8f29..b7109bb3 100644 --- a/docs/Phaser.Easing.Exponential.html +++ b/docs/Phaser.Easing.Exponential.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Linear.html b/docs/Phaser.Easing.Linear.html index 8ae137d0..75e8f309 100644 --- a/docs/Phaser.Easing.Linear.html +++ b/docs/Phaser.Easing.Linear.html @@ -695,7 +695,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quadratic.html b/docs/Phaser.Easing.Quadratic.html index 91bddf18..bfa0202e 100644 --- a/docs/Phaser.Easing.Quadratic.html +++ b/docs/Phaser.Easing.Quadratic.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quartic.html b/docs/Phaser.Easing.Quartic.html index e8de6809..8e5f55a5 100644 --- a/docs/Phaser.Easing.Quartic.html +++ b/docs/Phaser.Easing.Quartic.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quintic.html b/docs/Phaser.Easing.Quintic.html index 44f87a2a..15c5b3f9 100644 --- a/docs/Phaser.Easing.Quintic.html +++ b/docs/Phaser.Easing.Quintic.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.Sinusoidal.html b/docs/Phaser.Easing.Sinusoidal.html index aafa704c..47d9814a 100644 --- a/docs/Phaser.Easing.Sinusoidal.html +++ b/docs/Phaser.Easing.Sinusoidal.html @@ -977,7 +977,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Easing.html b/docs/Phaser.Easing.html index db985b57..b0ac592a 100644 --- a/docs/Phaser.Easing.html +++ b/docs/Phaser.Easing.html @@ -587,7 +587,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:39 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:14 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Events.html b/docs/Phaser.Events.html index 7cc8730c..886ee7c8 100644 --- a/docs/Phaser.Events.html +++ b/docs/Phaser.Events.html @@ -601,7 +601,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:40 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Filter.html b/docs/Phaser.Filter.html index 334545ac..18566451 100644 --- a/docs/Phaser.Filter.html +++ b/docs/Phaser.Filter.html @@ -1886,7 +1886,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:15 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Frame.html b/docs/Phaser.Frame.html index 68494aa6..abe3592d 100644 --- a/docs/Phaser.Frame.html +++ b/docs/Phaser.Frame.html @@ -2962,7 +2962,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.FrameData.html b/docs/Phaser.FrameData.html index ee5af43a..65490da4 100644 --- a/docs/Phaser.FrameData.html +++ b/docs/Phaser.FrameData.html @@ -1909,7 +1909,7 @@ The frames are returned in the output array, or if none is provided in a new Arr Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Game.html b/docs/Phaser.Game.html index 12c91c71..b314d979 100644 --- a/docs/Phaser.Game.html +++ b/docs/Phaser.Game.html @@ -5444,7 +5444,7 @@ This is extremely useful to hard to track down errors! Use the internal stepCoun Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.GameObjectFactory.html b/docs/Phaser.GameObjectFactory.html index 38c5b694..70dfb364 100644 --- a/docs/Phaser.GameObjectFactory.html +++ b/docs/Phaser.GameObjectFactory.html @@ -4919,7 +4919,7 @@ at set intervals, and fixes their positions and velocities accorindgly.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Gamepad.html b/docs/Phaser.Gamepad.html index ed3a2f52..79262e16 100644 --- a/docs/Phaser.Gamepad.html +++ b/docs/Phaser.Gamepad.html @@ -3376,7 +3376,7 @@ This MUST be called manually before Phaser will start polling the Gamepad API. Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.GamepadButton.html b/docs/Phaser.GamepadButton.html index d43c8d6b..fcd9f8aa 100644 --- a/docs/Phaser.GamepadButton.html +++ b/docs/Phaser.GamepadButton.html @@ -2554,7 +2554,7 @@ If the button is up it holds the duration of the previous down session.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:41 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:16 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Graphics.html b/docs/Phaser.Graphics.html index 27281eeb..f9e33f38 100644 --- a/docs/Phaser.Graphics.html +++ b/docs/Phaser.Graphics.html @@ -753,7 +753,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Group.html b/docs/Phaser.Group.html index 0c7ffc9b..f9231acd 100644 --- a/docs/Phaser.Group.html +++ b/docs/Phaser.Group.html @@ -9098,7 +9098,7 @@ You cannot swap a child with itself, or swap un-parented children, doing so will Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Input.html b/docs/Phaser.Input.html index 29f07bda..e37c825d 100644 --- a/docs/Phaser.Input.html +++ b/docs/Phaser.Input.html @@ -7662,7 +7662,7 @@ to only use if you've limited input to a single pointer (i.e. mouse or touch)

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.InputHandler.html b/docs/Phaser.InputHandler.html index 83b0f5e5..a3566d09 100644 --- a/docs/Phaser.InputHandler.html +++ b/docs/Phaser.InputHandler.html @@ -7665,7 +7665,7 @@ This value is only set when the pointer is over this Sprite.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Key.html b/docs/Phaser.Key.html index d5997f9c..e157d564 100644 --- a/docs/Phaser.Key.html +++ b/docs/Phaser.Key.html @@ -2544,7 +2544,7 @@ If the key is up it holds the duration of the previous down session.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Keyboard.html b/docs/Phaser.Keyboard.html index bb01f29d..bdc5ff30 100644 --- a/docs/Phaser.Keyboard.html +++ b/docs/Phaser.Keyboard.html @@ -2971,7 +2971,7 @@ This is called automatically by Phaser.Input and should not normally be invoked Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Line.html b/docs/Phaser.Line.html index 90a4d127..9ec2a100 100644 --- a/docs/Phaser.Line.html +++ b/docs/Phaser.Line.html @@ -3067,7 +3067,7 @@ Returns the intersection segment of AB and EF as a Point, or null if there is no Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:42 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:17 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.LinkedList.html b/docs/Phaser.LinkedList.html index 8df83cf2..d619138e 100644 --- a/docs/Phaser.LinkedList.html +++ b/docs/Phaser.LinkedList.html @@ -1463,7 +1463,7 @@ The function must exist on the member.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Loader.html b/docs/Phaser.Loader.html index 21a37187..067003e4 100644 --- a/docs/Phaser.Loader.html +++ b/docs/Phaser.Loader.html @@ -7147,7 +7147,7 @@ This allows you to easily make loading bars for games.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.LoaderParser.html b/docs/Phaser.LoaderParser.html index 59f86bb4..cd53fd43 100644 --- a/docs/Phaser.LoaderParser.html +++ b/docs/Phaser.LoaderParser.html @@ -695,7 +695,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.MSPointer.html b/docs/Phaser.MSPointer.html index 71a61f9a..cf6ba3be 100644 --- a/docs/Phaser.MSPointer.html +++ b/docs/Phaser.MSPointer.html @@ -1413,7 +1413,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Math.html b/docs/Phaser.Math.html index cd9097b5..e967d242 100644 --- a/docs/Phaser.Math.html +++ b/docs/Phaser.Math.html @@ -11191,7 +11191,7 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Mouse.html b/docs/Phaser.Mouse.html index 8c945bbf..a638db79 100644 --- a/docs/Phaser.Mouse.html +++ b/docs/Phaser.Mouse.html @@ -2730,7 +2730,7 @@ If the browser successfully enters a locked state the event Phaser.Mouse.pointer Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Net.html b/docs/Phaser.Net.html index 906f15a3..f6ac926c 100644 --- a/docs/Phaser.Net.html +++ b/docs/Phaser.Net.html @@ -1357,7 +1357,7 @@ Optionally you can redirect to the new url, or just return it as a string.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:18 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Particles.Arcade.Emitter.html b/docs/Phaser.Particles.Arcade.Emitter.html index 6470af8a..b5c9a86b 100644 --- a/docs/Phaser.Particles.Arcade.Emitter.html +++ b/docs/Phaser.Particles.Arcade.Emitter.html @@ -13290,7 +13290,7 @@ You cannot swap a child with itself, or swap un-parented children, doing so will Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Particles.html b/docs/Phaser.Particles.html index 961ffb3a..2e7b79ff 100644 --- a/docs/Phaser.Particles.html +++ b/docs/Phaser.Particles.html @@ -1246,7 +1246,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:43 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Physics.Arcade.Body.html b/docs/Phaser.Physics.Arcade.Body.html index 500a16e3..62bceca5 100644 --- a/docs/Phaser.Physics.Arcade.Body.html +++ b/docs/Phaser.Physics.Arcade.Body.html @@ -10128,7 +10128,7 @@ See also the Body.offset property.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Physics.Arcade.html b/docs/Phaser.Physics.Arcade.html index ad40c8e4..57499ae0 100644 --- a/docs/Phaser.Physics.Arcade.html +++ b/docs/Phaser.Physics.Arcade.html @@ -8077,7 +8077,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Physics.html b/docs/Phaser.Physics.html index cfa8b8d6..1a318a22 100644 --- a/docs/Phaser.Physics.html +++ b/docs/Phaser.Physics.html @@ -553,7 +553,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Plugin.html b/docs/Phaser.Plugin.html index 6eb74e05..94427fd5 100644 --- a/docs/Phaser.Plugin.html +++ b/docs/Phaser.Plugin.html @@ -1920,7 +1920,7 @@ It is only called if active is set to true.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.PluginManager.html b/docs/Phaser.PluginManager.html index c52f8840..1622584d 100644 --- a/docs/Phaser.PluginManager.html +++ b/docs/Phaser.PluginManager.html @@ -1585,7 +1585,7 @@ It only calls plugins who have active=true.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:19 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Point.html b/docs/Phaser.Point.html index bea8469b..b631784d 100644 --- a/docs/Phaser.Point.html +++ b/docs/Phaser.Point.html @@ -5281,7 +5281,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:44 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Pointer.html b/docs/Phaser.Pointer.html index 63bde056..141b46aa 100644 --- a/docs/Phaser.Pointer.html +++ b/docs/Phaser.Pointer.html @@ -4368,7 +4368,7 @@ If you wish to check if the Pointer was released just once then see the Sprite.e Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Polygon.html b/docs/Phaser.Polygon.html index ec5c0be6..63dac9fd 100644 --- a/docs/Phaser.Polygon.html +++ b/docs/Phaser.Polygon.html @@ -713,7 +713,7 @@ arguments passed can be flat x,y values e.g. new PIXI.Polygon(x,y, x,y, x, Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.QuadTree.html b/docs/Phaser.QuadTree.html index f97069a0..ac6c6a12 100644 --- a/docs/Phaser.QuadTree.html +++ b/docs/Phaser.QuadTree.html @@ -1634,7 +1634,7 @@ Split the node into 4 subnodes

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.RandomDataGenerator.html b/docs/Phaser.RandomDataGenerator.html index 6df624e0..6c5188d8 100644 --- a/docs/Phaser.RandomDataGenerator.html +++ b/docs/Phaser.RandomDataGenerator.html @@ -2051,7 +2051,7 @@ Random number generator from Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Rectangle.html b/docs/Phaser.Rectangle.html index 69d98a4a..733b03d7 100644 --- a/docs/Phaser.Rectangle.html +++ b/docs/Phaser.Rectangle.html @@ -7392,7 +7392,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.RenderTexture.html b/docs/Phaser.RenderTexture.html index e2944bc7..d2b7d6d9 100644 --- a/docs/Phaser.RenderTexture.html +++ b/docs/Phaser.RenderTexture.html @@ -1994,7 +1994,7 @@ If the display object is a Group or has children it will draw all children as we Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.RequestAnimationFrame.html b/docs/Phaser.RequestAnimationFrame.html index 8a713f23..2c6128ef 100644 --- a/docs/Phaser.RequestAnimationFrame.html +++ b/docs/Phaser.RequestAnimationFrame.html @@ -1317,7 +1317,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:20 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Signal.html b/docs/Phaser.Signal.html index f7acc3d6..7fd45304 100644 --- a/docs/Phaser.Signal.html +++ b/docs/Phaser.Signal.html @@ -2302,7 +2302,7 @@ IMPORTANT: should be called only during signal dispatch, calling it before/after Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.SinglePad.html b/docs/Phaser.SinglePad.html index 9a383f20..54735128 100644 --- a/docs/Phaser.SinglePad.html +++ b/docs/Phaser.SinglePad.html @@ -3789,7 +3789,7 @@ analog trigger buttons on the XBOX 360 controller

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Sound.html b/docs/Phaser.Sound.html index f4a5f875..108aa58a 100644 --- a/docs/Phaser.Sound.html +++ b/docs/Phaser.Sound.html @@ -5813,7 +5813,7 @@ This allows you to bundle multiple sounds together into a single audio file and Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.SoundManager.html b/docs/Phaser.SoundManager.html index 61baf5f0..1602f767 100644 --- a/docs/Phaser.SoundManager.html +++ b/docs/Phaser.SoundManager.html @@ -2871,7 +2871,7 @@ Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:conf Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Sprite.html b/docs/Phaser.Sprite.html index 00cfdf67..8665b71a 100644 --- a/docs/Phaser.Sprite.html +++ b/docs/Phaser.Sprite.html @@ -7955,7 +7955,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Stage.html b/docs/Phaser.Stage.html index 387e2f15..475c1228 100644 --- a/docs/Phaser.Stage.html +++ b/docs/Phaser.Stage.html @@ -1944,7 +1944,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.StageScaleMode.html b/docs/Phaser.StageScaleMode.html index a1a18bc7..fc33400f 100644 --- a/docs/Phaser.StageScaleMode.html +++ b/docs/Phaser.StageScaleMode.html @@ -4918,7 +4918,7 @@ Please note that this needs to be supported by the web browser and isn't the sam Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:21 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.State.html b/docs/Phaser.State.html index abab9677..2af10025 100644 --- a/docs/Phaser.State.html +++ b/docs/Phaser.State.html @@ -2582,7 +2582,7 @@ If you need to use the loader, you may need to use them here.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:46 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.StateManager.html b/docs/Phaser.StateManager.html index b55fde6e..c0dfa54c 100644 --- a/docs/Phaser.StateManager.html +++ b/docs/Phaser.StateManager.html @@ -3268,7 +3268,7 @@ State must exist and have at least one callback function registered..

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Text.html b/docs/Phaser.Text.html index 7146feb1..89174689 100644 --- a/docs/Phaser.Text.html +++ b/docs/Phaser.Text.html @@ -2574,7 +2574,7 @@ If you wish to work in radians instead of degrees use the property Sprite.rotati Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Tile.html b/docs/Phaser.Tile.html index 27e6086b..4dcba3a7 100644 --- a/docs/Phaser.Tile.html +++ b/docs/Phaser.Tile.html @@ -3979,7 +3979,7 @@ The callback must true true for collision processing to take place.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.TileSprite.html b/docs/Phaser.TileSprite.html index 27152725..8e065c04 100644 --- a/docs/Phaser.TileSprite.html +++ b/docs/Phaser.TileSprite.html @@ -8590,7 +8590,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Tilemap.html b/docs/Phaser.Tilemap.html index 2bcf4b59..51864888 100644 --- a/docs/Phaser.Tilemap.html +++ b/docs/Phaser.Tilemap.html @@ -666,7 +666,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -726,7 +726,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -828,7 +828,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -930,7 +930,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1041,6 +1041,210 @@ A map may have multiple layers. You can perform operations on the map data such + + + + + + + + +
+

height

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
height + + +number + + + +

The height of the map (in tiles).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

heightInPixels

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
heightInPixels + + +number + + + +

The height of the map in pixels based on height * tileHeight.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + +
@@ -1134,7 +1338,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1338,7 +1542,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1440,7 +1644,313 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
+ + + + + + + + + + + + + + + +
+

orientation

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
orientation + + +string + + + +

The orientation of the map data (as specified in Tiled), usually 'orthogonal'.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

properties

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
properties + + +object + + + +

Map specific properties as specified in Tiled.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

tileHeight

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tileHeight + + +number + + + +

The base height of the tiles in the map (in pixels).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1542,7 +2052,7 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
@@ -1644,7 +2154,415 @@ A map may have multiple layers. You can perform operations on the map data such
Source:
+ + + + + + + +
+ + + +
+ + + +
+

tileWidth

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tileWidth + + +number + + + +

The base width of the tiles in the map (in pixels).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

version

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
version + + +number + + + +

The version of the map data (as specified in Tiled, usually 1).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

width

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
width + + +number + + + +

The width of the map (in tiles).

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
+ + + +
+

widthInPixels

+ + +
+
+ + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
widthInPixels + + +number + + + +

The width of the map in pixels based on width * tileWidth.

+
+ + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1802,7 +2720,125 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

<protected> calculateFaces(layer)

+ + +
+
+ + +
+

Internal function.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number + + + +

The index of the TilemapLayer to operate on.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2062,7 +3098,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2249,7 +3285,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2272,6 +3308,623 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or +
+ + + +
+

createFromObjects(name, gid, key, frame, exists, autoCull, group)

+ + +
+
+ + +
+

Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is +given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to +configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the +Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
name + + +string + + + + + + + + + + + +

The name of the Object Group to create Sprites from.

gid + + +number + + + + + + + + + + + +

The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.

key + + +string + + + + + + + + + + + +

The Game.cache key of the image that this Sprite will use.

frame + + +number +| + +string + + + + + + <optional>
+ + + + + +
+ +

If the Sprite image contains multiple frames you can specify which one to use here.

exists + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

The default exists state of the Sprite.

autoCull + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range.

group + + +Phaser.Group + + + + + + <optional>
+ + + + + +
+ +

Optional Group to add the Sprite to. If not specified it will be added to the World group.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

createLayer(layer, width, height, group) → {Phaser.TilemapLayer}

+ + +
+
+ + +
+

Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. +The layer parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. +Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
layer + + +number +| + +string + + + + + + + + + +

The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.

width + + +number + + + + + + <optional>
+ + + + + +

The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width.

height + + +number + + + + + + <optional>
+ + + + + +

The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height.

group + + +Phaser.Group + + + + + + <optional>
+ + + + + +

Optional Group to add the object to. If not specified it will be added to the World group.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.

+
+ + + +
+
+ Type +
+
+ +Phaser.TilemapLayer + + +
+
+ + + + +
@@ -2318,7 +3971,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2387,7 +4040,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -2678,7 +4331,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3000,7 +4653,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3023,6 +4676,740 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or + + + + +
+

getImageIndex(name) → {number}

+ + +
+
+ + +
+

Gets the image index based on its name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the image to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The index of the image in this tilemap, or null if not found.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<protected> getIndex(location, name) → {number}

+ + +
+
+ + +
+

Gets the layer index based on the layers name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
location + + +array + + + +

The local array to search.

name + + +string + + + +

The name of the array element to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The index of the element in the array, or null if not found.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

<protected> getLayer(layer) → {number}

+ + +
+
+ + +
+

Gets the TilemapLayer index as used in the setCollision calls.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The TilemapLayer index.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

getLayerIndex(name) → {number}

+ + +
+
+ + +
+

Gets the layer index based on its name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the layer to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The index of the layer in this tilemap, or null if not found.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + +
+ + + +
+

getObjectIndex(name) → {number}

+ + +
+
+ + +
+

Gets the object index based on its name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the object to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The index of the object in this tilemap, or null if not found.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + +
@@ -3198,7 +5585,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3244,6 +5631,807 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or + + + + +
+

getTileAbove(layer, x, y)

+ + +
+
+ + +
+

Gets the tile above the tile coordinates given. +Mostly used as an internal function by calculateFaces.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number + + + +

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x + + +number + + + +

The x coordinate to get the tile from. In tiles, not pixels.

y + + +number + + + +

The y coordinate to get the tile from. In tiles, not pixels.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

getTileBelow(layer, x, y)

+ + +
+
+ + +
+

Gets the tile below the tile coordinates given. +Mostly used as an internal function by calculateFaces.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number + + + +

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x + + +number + + + +

The x coordinate to get the tile from. In tiles, not pixels.

y + + +number + + + +

The y coordinate to get the tile from. In tiles, not pixels.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

getTileLeft(layer, x, y)

+ + +
+
+ + +
+

Gets the tile to the left of the tile coordinates given. +Mostly used as an internal function by calculateFaces.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number + + + +

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x + + +number + + + +

The x coordinate to get the tile from. In tiles, not pixels.

y + + +number + + + +

The y coordinate to get the tile from. In tiles, not pixels.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

getTileRight(layer, x, y)

+ + +
+
+ + +
+

Gets the tile to the right of the tile coordinates given. +Mostly used as an internal function by calculateFaces.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
layer + + +number + + + +

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x + + +number + + + +

The x coordinate to get the tile from. In tiles, not pixels.

y + + +number + + + +

The y coordinate to get the tile from. In tiles, not pixels.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

getTilesetIndex(name) → {number}

+ + +
+
+ + +
+

Gets the tileset index based on its name.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + +

The name of the tileset to get.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + +
+

The index of the tileset in this tilemap, or null if not found.

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + +
@@ -3419,7 +6607,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3671,7 +6859,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -3903,7 +7091,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4197,7 +7385,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4457,7 +7645,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4526,7 +7714,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -4848,7 +8036,947 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+

setCollision(indexes, collides, layer)

+ + +
+
+ + +
+

Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. +The collides parameter controls if collision will be enabled (true) or disabled (false).

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
indexes + + +number +| + +array + + + + + + + + + + + +

Either a single tile index, or an array of tile IDs to be checked for collision.

collides + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

If true it will enable collision. If false it will clear collision.

layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + + + + <optional>
+ + + + + +
+ +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

setCollisionBetween(start, stop, collides, layer)

+ + +
+
+ + +
+

Sets collision on a range of tiles where the tile IDs increment sequentially. +Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. +The collides parameter controls if collision will be enabled (true) or disabled (false).

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
start + + +number + + + + + + + + + + + +

The first index of the tile to be set for collision.

stop + + +number + + + + + + + + + + + +

The last index of the tile to be set for collision.

collides + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

If true it will enable collision. If false it will clear collision.

layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + + + + <optional>
+ + + + + +
+ +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

setCollisionByExclusion(indexes, collides, layer)

+ + +
+
+ + +
+

Sets collision on all tiles in the given layer, except for the IDs of those in the given array. +The collides parameter controls if collision will be enabled (true) or disabled (false).

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
indexes + + +array + + + + + + + + + + + +

An array of the tile IDs to not be counted for collision.

collides + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

If true it will enable collision. If false it will clear collision.

layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + + + + <optional>
+ + + + + +
+ +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

<protected> setCollisionByIndex(index, collides, layer, recalculate)

+ + +
+
+ + +
+

Sets collision values on a tile in the set. +You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
index + + +number + + + + + + + + + + + +

The index of the tile on the layer.

collides + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

If true it will enable collision on the tile. If false it will clear collision values from the tile.

layer + + +number + + + + + + <optional>
+ + + + + +
+ +

The layer to operate on. If not given will default to this.currentLayer.

recalculate + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + +

Recalculates the tile faces after the update.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -4972,7 +9100,565 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

setTileIndexCallback(indexes, callback, callbackContext, layer)

+ + +
+
+ + +
+

Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. +If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. +If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
indexes + + +number +| + +array + + + + + + + + + +

Either a single tile index, or an array of tile indexes to have a collision callback set for.

callback + + +function + + + + + + + + + +

The callback that will be invoked when the tile is collided with.

callbackContext + + +object + + + + + + + + + +

The context under which the callback is called.

layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + + + + <optional>
+ + + + + +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+

setTileLocationCallback(x, y, width, height, callback, callbackContext, layer)

+ + +
+
+ + +
+

Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. +If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. +If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

+
+ + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
x + + +number + + + + + + + + + +

X position of the top left of the area to copy (given in tiles, not pixels)

y + + +number + + + + + + + + + +

Y position of the top left of the area to copy (given in tiles, not pixels)

width + + +number + + + + + + + + + +

The width of the area to copy (given in tiles, not pixels)

height + + +number + + + + + + + + + +

The height of the area to copy (given in tiles, not pixels)

callback + + +function + + + + + + + + + +

The callback that will be invoked when the tile is collided with.

callbackContext + + +object + + + + + + + + + +

The context under which the callback is called.

layer + + +number +| + +string +| + +Phaser.TilemapLayer + + + + + + <optional>
+ + + + + +

The layer to operate on. If not given will default to this.currentLayer.

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -5232,7 +9918,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -5554,7 +10240,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or
Source:
@@ -5605,7 +10291,7 @@ Note that the tileset name can be found in the JSON file exported from Tiled, or Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.TilemapLayer.html b/docs/Phaser.TilemapLayer.html index 7a4cdb29..ad9bb3d8 100644 --- a/docs/Phaser.TilemapLayer.html +++ b/docs/Phaser.TilemapLayer.html @@ -4614,7 +4614,7 @@ half as quickly as the 'normal' camera-locked layers do)

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.TilemapParser.html b/docs/Phaser.TilemapParser.html index 53528640..322389a6 100644 --- a/docs/Phaser.TilemapParser.html +++ b/docs/Phaser.TilemapParser.html @@ -1457,7 +1457,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:22 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Tileset.html b/docs/Phaser.Tileset.html index b54bc3f3..71893fa2 100644 --- a/docs/Phaser.Tileset.html +++ b/docs/Phaser.Tileset.html @@ -1849,124 +1849,6 @@ You should not normally instantiate this class directly.

-
-

<protected> calculateFaces(layer)

- - -
-
- - -
-

Internal function.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number - - - -

The index of the TilemapLayer to operate on.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - -

checkTileIndex(index) → {boolean}

@@ -2108,1355 +1990,6 @@ You should not normally instantiate this class directly.

-
- - - -
-

createFromObjects(name, gid, key, frame, exists, autoCull, group)

- - -
-
- - -
-

Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is -given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to -configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the -Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
name - - -string - - - - - - - - - - - -

The name of the Object Group to create Sprites from.

gid - - -number - - - - - - - - - - - -

The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.

key - - -string - - - - - - - - - - - -

The Game.cache key of the image that this Sprite will use.

frame - - -number -| - -string - - - - - - <optional>
- - - - - -
- -

If the Sprite image contains multiple frames you can specify which one to use here.

exists - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

The default exists state of the Sprite.

autoCull - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range.

group - - -Phaser.Group - - - - - - <optional>
- - - - - -
- -

Optional Group to add the Sprite to. If not specified it will be added to the World group.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

createLayer(layer, width, height, group) → {Phaser.TilemapLayer}

- - -
-
- - -
-

Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDescription
layer - - -number -| - -string - - - - - - - - - -

The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents.

width - - -number - - - - - - <optional>
- - - - - -

The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width.

height - - -number - - - - - - <optional>
- - - - - -

The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height.

group - - -Phaser.Group - - - - - - <optional>
- - - - - -

Optional Group to add the object to. If not specified it will be added to the World group.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.

-
- - - -
-
- Type -
-
- -Phaser.TilemapLayer - - -
-
- - - - - -
- - - -
-

getImageIndex(name) → {number}

- - -
-
- - -
-

Gets the image index based on its name.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - -

The name of the image to get.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The index of the image in this tilemap, or null if not found.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - -
- - - -
-

<protected> getIndex(location, name) → {number}

- - -
-
- - -
-

Gets the layer index based on the layers name.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
location - - -array - - - -

The local array to search.

name - - -string - - - -

The name of the array element to get.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The index of the element in the array, or null if not found.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - -
- - - -
-

<protected> getLayer(layer) → {number}

- - -
-
- - -
-

Gets the TilemapLayer index as used in the setCollision calls.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The TilemapLayer index.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - -
- - - -
-

getLayerIndex(name) → {number}

- - -
-
- - -
-

Gets the layer index based on its name.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - -

The name of the layer to get.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The index of the layer in this tilemap, or null if not found.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - -
- - - -
-

getObjectIndex(name) → {number}

- - -
-
- - -
-

Gets the object index based on its name.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - -

The name of the object to get.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The index of the object in this tilemap, or null if not found.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - -
@@ -3602,807 +2135,6 @@ Sprite is created. You could also give it a value like: body.velocity.x: 100 to - - - - -
-

getTileAbove(layer, x, y)

- - -
-
- - -
-

Gets the tile above the tile coordinates given. -Mostly used as an internal function by calculateFaces.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number - - - -

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x - - -number - - - -

The x coordinate to get the tile from. In tiles, not pixels.

y - - -number - - - -

The y coordinate to get the tile from. In tiles, not pixels.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

getTileBelow(layer, x, y)

- - -
-
- - -
-

Gets the tile below the tile coordinates given. -Mostly used as an internal function by calculateFaces.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number - - - -

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x - - -number - - - -

The x coordinate to get the tile from. In tiles, not pixels.

y - - -number - - - -

The y coordinate to get the tile from. In tiles, not pixels.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

getTileLeft(layer, x, y)

- - -
-
- - -
-

Gets the tile to the left of the tile coordinates given. -Mostly used as an internal function by calculateFaces.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number - - - -

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x - - -number - - - -

The x coordinate to get the tile from. In tiles, not pixels.

y - - -number - - - -

The y coordinate to get the tile from. In tiles, not pixels.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

getTileRight(layer, x, y)

- - -
-
- - -
-

Gets the tile to the right of the tile coordinates given. -Mostly used as an internal function by calculateFaces.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
layer - - -number - - - -

The local layer index to get the tile from. Can be determined by Tilemap.getLayer().

x - - -number - - - -

The x coordinate to get the tile from. In tiles, not pixels.

y - - -number - - - -

The y coordinate to get the tile from. In tiles, not pixels.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

getTilesetIndex(name) → {number}

- - -
-
- - -
-

Gets the tileset index based on its name.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - -

The name of the tileset to get.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - -
Returns:
- - -
-

The index of the tileset in this tilemap, or null if not found.

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - -
@@ -4693,946 +2425,6 @@ Mostly used as an internal function by calculateFaces.

- - - - -
-

setCollision(indexes, collides, layer)

- - -
-
- - -
-

Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. -The collides parameter controls if collision will be enabled (true) or disabled (false).

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
indexes - - -number -| - -array - - - - - - - - - - - -

Either a single tile index, or an array of tile IDs to be checked for collision.

collides - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

If true it will enable collision. If false it will clear collision.

layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - - - - <optional>
- - - - - -
- -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

setCollisionBetween(start, stop, collides, layer)

- - -
-
- - -
-

Sets collision on a range of tiles where the tile IDs increment sequentially. -Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. -The collides parameter controls if collision will be enabled (true) or disabled (false).

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
start - - -number - - - - - - - - - - - -

The first index of the tile to be set for collision.

stop - - -number - - - - - - - - - - - -

The last index of the tile to be set for collision.

collides - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

If true it will enable collision. If false it will clear collision.

layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - - - - <optional>
- - - - - -
- -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

setCollisionByExclusion(indexes, collides, layer)

- - -
-
- - -
-

Sets collision on all tiles in the given layer, except for the IDs of those in the given array. -The collides parameter controls if collision will be enabled (true) or disabled (false).

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
indexes - - -array - - - - - - - - - - - -

An array of the tile IDs to not be counted for collision.

collides - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

If true it will enable collision. If false it will clear collision.

layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - - - - <optional>
- - - - - -
- -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

<protected> setCollisionByIndex(index, collides, layer, recalculate)

- - -
-
- - -
-

Sets collision values on a tile in the set. -You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDefaultDescription
index - - -number - - - - - - - - - - - -

The index of the tile on the layer.

collides - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

If true it will enable collision on the tile. If false it will clear collision values from the tile.

layer - - -number - - - - - - <optional>
- - - - - -
- -

The layer to operate on. If not given will default to this.currentLayer.

recalculate - - -boolean - - - - - - <optional>
- - - - - -
- - true - -

Recalculates the tile faces after the update.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - -
@@ -5796,564 +2588,6 @@ You shouldn't usually call this method directly, instead use setCollision, setCo - - - - -
-

setTileIndexCallback(indexes, callback, callbackContext, layer)

- - -
-
- - -
-

Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. -If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. -If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDescription
indexes - - -number -| - -array - - - - - - - - - -

Either a single tile index, or an array of tile indexes to have a collision callback set for.

callback - - -function - - - - - - - - - -

The callback that will be invoked when the tile is collided with.

callbackContext - - -object - - - - - - - - - -

The context under which the callback is called.

layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - - - - <optional>
- - - - - -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
- - - -
-

setTileLocationCallback(x, y, width, height, callback, callbackContext, layer)

- - -
-
- - -
-

Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. -If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. -If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

-
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeArgumentDescription
x - - -number - - - - - - - - - -

X position of the top left of the area to copy (given in tiles, not pixels)

y - - -number - - - - - - - - - -

Y position of the top left of the area to copy (given in tiles, not pixels)

width - - -number - - - - - - - - - -

The width of the area to copy (given in tiles, not pixels)

height - - -number - - - - - - - - - -

The height of the area to copy (given in tiles, not pixels)

callback - - -function - - - - - - - - - -

The callback that will be invoked when the tile is collided with.

callbackContext - - -object - - - - - - - - - -

The context under which the callback is called.

layer - - -number -| - -string -| - -Phaser.TilemapLayer - - - - - - <optional>
- - - - - -

The layer to operate on. If not given will default to this.currentLayer.

- - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - -
@@ -6382,7 +2616,7 @@ If you want to set a callback for a tile at a specific location on the map then Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:47 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Time.html b/docs/Phaser.Time.html index 9de6001b..0e6d2557 100644 --- a/docs/Phaser.Time.html +++ b/docs/Phaser.Time.html @@ -3096,7 +3096,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Timer.html b/docs/Phaser.Timer.html index f46ff4f8..3e878384 100644 --- a/docs/Phaser.Timer.html +++ b/docs/Phaser.Timer.html @@ -3760,7 +3760,7 @@ If the Timer is already running the delay will be calculated based on the timers Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.TimerEvent.html b/docs/Phaser.TimerEvent.html index ba802973..3227c74f 100644 --- a/docs/Phaser.TimerEvent.html +++ b/docs/Phaser.TimerEvent.html @@ -1685,7 +1685,7 @@ It can call a specific callback, passing in optional parameters.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Touch.html b/docs/Phaser.Touch.html index 85a02e2d..f4e03a48 100644 --- a/docs/Phaser.Touch.html +++ b/docs/Phaser.Touch.html @@ -2655,7 +2655,7 @@ Doesn't appear to be supported by most browsers on a canvas element yet.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Tween.html b/docs/Phaser.Tween.html index 80083f20..e32693d2 100644 --- a/docs/Phaser.Tween.html +++ b/docs/Phaser.Tween.html @@ -3144,7 +3144,7 @@ Used in combination with repeat you can create endless loops.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.TweenManager.html b/docs/Phaser.TweenManager.html index d0f8503d..c788503a 100644 --- a/docs/Phaser.TweenManager.html +++ b/docs/Phaser.TweenManager.html @@ -1648,7 +1648,7 @@ Please see https://github.com/sole/tw Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:23 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Utils.Debug.html b/docs/Phaser.Utils.Debug.html index 50b2d0d3..a6f2dc12 100644 --- a/docs/Phaser.Utils.Debug.html +++ b/docs/Phaser.Utils.Debug.html @@ -6870,7 +6870,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:24 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.Utils.html b/docs/Phaser.Utils.html index a59f9f41..de772d78 100644 --- a/docs/Phaser.Utils.html +++ b/docs/Phaser.Utils.html @@ -1273,7 +1273,7 @@ dir = 1 (left), 2 (right), 3 (both)

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:48 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:24 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.World.html b/docs/Phaser.World.html index ba727649..5d33b67c 100644 --- a/docs/Phaser.World.html +++ b/docs/Phaser.World.html @@ -10272,7 +10272,7 @@ Most objects won't have an update method set unless explicitly given one.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:49 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:24 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.html b/docs/Phaser.html index 86e365d9..1f432772 100644 --- a/docs/Phaser.html +++ b/docs/Phaser.html @@ -738,7 +738,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Phaser.js.html b/docs/Phaser.js.html index 0e8d10a6..1c166445 100644 --- a/docs/Phaser.js.html +++ b/docs/Phaser.js.html @@ -502,7 +502,7 @@ PIXI.InteractionManager = function (dummy) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Plugin.js.html b/docs/Plugin.js.html index 89b47326..8e3b09a8 100644 --- a/docs/Plugin.js.html +++ b/docs/Plugin.js.html @@ -573,7 +573,7 @@ Phaser.Plugin.prototype.constructor = Phaser.Plugin; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/PluginManager.js.html b/docs/PluginManager.js.html index 04fd0f73..42c45cfe 100644 --- a/docs/PluginManager.js.html +++ b/docs/PluginManager.js.html @@ -749,7 +749,7 @@ Phaser.PluginManager.prototype.constructor = Phaser.PluginManager; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Point.js.html b/docs/Point.js.html index cef3ca7e..1a3a3bea 100644 --- a/docs/Point.js.html +++ b/docs/Point.js.html @@ -882,7 +882,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Pointer.js.html b/docs/Pointer.js.html index b8f70557..82010aee 100644 --- a/docs/Pointer.js.html +++ b/docs/Pointer.js.html @@ -1094,7 +1094,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldY", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Polygon.js.html b/docs/Polygon.js.html index dbe1fdb6..20edf759 100644 --- a/docs/Polygon.js.html +++ b/docs/Polygon.js.html @@ -479,7 +479,7 @@ Phaser.Polygon.prototype.constructor = Phaser.Polygon; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/QuadTree.js.html b/docs/QuadTree.js.html index c0c3a4fe..d9293ac9 100644 --- a/docs/QuadTree.js.html +++ b/docs/QuadTree.js.html @@ -737,7 +737,7 @@ Phaser.QuadTree.prototype.constructor = Phaser.QuadTree; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/RandomDataGenerator.js.html b/docs/RandomDataGenerator.js.html index e86d11b9..0840675b 100644 --- a/docs/RandomDataGenerator.js.html +++ b/docs/RandomDataGenerator.js.html @@ -699,7 +699,7 @@ Phaser.RandomDataGenerator.prototype.constructor = Phaser.RandomDataGenerator; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Rectangle.js.html b/docs/Rectangle.js.html index 7e06e39a..3cb911c0 100644 --- a/docs/Rectangle.js.html +++ b/docs/Rectangle.js.html @@ -1140,7 +1140,7 @@ Phaser.Rectangle.union = function (a, b, out) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/RenderTexture.js.html b/docs/RenderTexture.js.html index b694dc4a..fb3a4ce9 100644 --- a/docs/RenderTexture.js.html +++ b/docs/RenderTexture.js.html @@ -782,7 +782,7 @@ Phaser.RenderTexture.prototype.renderCanvas = function(displayObject, position, Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/RequestAnimationFrame.js.html b/docs/RequestAnimationFrame.js.html index 1b7e0e24..5f65a26d 100644 --- a/docs/RequestAnimationFrame.js.html +++ b/docs/RequestAnimationFrame.js.html @@ -609,7 +609,7 @@ Phaser.RequestAnimationFrame.prototype.constructor = Phaser.RequestAnimationFram Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/SAT.js.html b/docs/SAT.js.html index 34e90c31..46317e91 100644 --- a/docs/SAT.js.html +++ b/docs/SAT.js.html @@ -1286,7 +1286,7 @@ var SAT = (function () { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Signal.js.html b/docs/Signal.js.html index 57addc32..f4600ae6 100644 --- a/docs/Signal.js.html +++ b/docs/Signal.js.html @@ -754,7 +754,7 @@ Phaser.Signal.prototype.constructor = Phaser.Signal; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/SignalBinding.html b/docs/SignalBinding.html index 6c955d8b..9723992f 100644 --- a/docs/SignalBinding.html +++ b/docs/SignalBinding.html @@ -747,7 +747,7 @@ Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:49 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:24 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/SignalBinding.js.html b/docs/SignalBinding.js.html index 14dc3c35..b4f72e8d 100644 --- a/docs/SignalBinding.js.html +++ b/docs/SignalBinding.js.html @@ -614,7 +614,7 @@ Phaser.SignalBinding.prototype.constructor = Phaser.SignalBinding; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/SinglePad.js.html b/docs/SinglePad.js.html index 0ac1b770..77fe5c4f 100644 --- a/docs/SinglePad.js.html +++ b/docs/SinglePad.js.html @@ -1019,7 +1019,7 @@ Object.defineProperty(Phaser.SinglePad.prototype, "index", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Sound.js.html b/docs/Sound.js.html index d0ced835..960c623b 100644 --- a/docs/Sound.js.html +++ b/docs/Sound.js.html @@ -1275,7 +1275,7 @@ Object.defineProperty(Phaser.Sound.prototype, "volume", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/SoundManager.js.html b/docs/SoundManager.js.html index 6ec0c4a6..a2100b5d 100644 --- a/docs/SoundManager.js.html +++ b/docs/SoundManager.js.html @@ -932,7 +932,7 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Sprite.js.html b/docs/Sprite.js.html index c41d9864..98cf72ba 100644 --- a/docs/Sprite.js.html +++ b/docs/Sprite.js.html @@ -1662,7 +1662,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Stage.js.html b/docs/Stage.js.html index 90c80344..4b29e7f7 100644 --- a/docs/Stage.js.html +++ b/docs/Stage.js.html @@ -720,7 +720,7 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/StageScaleMode.js.html b/docs/StageScaleMode.js.html index 1a9b1cbd..615eb702 100644 --- a/docs/StageScaleMode.js.html +++ b/docs/StageScaleMode.js.html @@ -1226,7 +1226,7 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/State.js.html b/docs/State.js.html index 023f223d..faa13d05 100644 --- a/docs/State.js.html +++ b/docs/State.js.html @@ -621,7 +621,7 @@ Phaser.State.prototype.constructor = Phaser.State; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/StateManager.js.html b/docs/StateManager.js.html index 581e15d3..235ff79c 100644 --- a/docs/StateManager.js.html +++ b/docs/StateManager.js.html @@ -978,7 +978,7 @@ Phaser.StateManager.prototype.constructor = Phaser.StateManager; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Text.js.html b/docs/Text.js.html index 37796f74..065254e7 100644 --- a/docs/Text.js.html +++ b/docs/Text.js.html @@ -751,7 +751,7 @@ Object.defineProperty(Phaser.Text.prototype, 'font', { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Tile.js.html b/docs/Tile.js.html index 882d1317..8ad9a00e 100644 --- a/docs/Tile.js.html +++ b/docs/Tile.js.html @@ -743,7 +743,7 @@ Object.defineProperty(Phaser.Tile.prototype, "bottom", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/TileSprite.js.html b/docs/TileSprite.js.html index af432470..0537b842 100644 --- a/docs/TileSprite.js.html +++ b/docs/TileSprite.js.html @@ -608,7 +608,7 @@ Object.defineProperty(Phaser.TileSprite.prototype, "inputEnabled", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Tilemap.js.html b/docs/Tilemap.js.html index ab9825f4..a12cc10e 100644 --- a/docs/Tilemap.js.html +++ b/docs/Tilemap.js.html @@ -463,14 +463,49 @@ Phaser.Tilemap = function (game, key) { return; } + /** + * @property {number} width - The width of the map (in tiles). + */ this.width = data.width; + + /** + * @property {number} height - The height of the map (in tiles). + */ this.height = data.height; + + /** + * @property {number} tileWidth - The base width of the tiles in the map (in pixels). + */ this.tileWidth = data.tileWidth; + + /** + * @property {number} tileHeight - The base height of the tiles in the map (in pixels). + */ this.tileHeight = data.tileHeight; + + /** + * @property {string} orientation - The orientation of the map data (as specified in Tiled), usually 'orthogonal'. + */ this.orientation = data.orientation; + + /** + * @property {number} version - The version of the map data (as specified in Tiled, usually 1). + */ this.version = data.version; + + /** + * @property {object} properties - Map specific properties as specified in Tiled. + */ this.properties = data.properties; + + /** + * @property {number} widthInPixels - The width of the map in pixels based on width * tileWidth. + */ this.widthInPixels = data.widthInPixels; + + /** + * @property {number} heightInPixels - The height of the map in pixels based on height * tileHeight. + */ this.heightInPixels = data.heightInPixels; /** @@ -515,13 +550,13 @@ Phaser.Tilemap = function (game, key) { this._results = []; /** - * @property {number} _tempA - Internal var. + * @property {number} _tempA - Internal cache var. * @private */ this._tempA = 0; /** - * @property {number} _tempB - Internal var. + * @property {number} _tempB - Internal cache var. * @private */ this._tempB = 0; @@ -576,7 +611,7 @@ Phaser.Tilemap.prototype = { format: Phaser.Tilemap.CSV, data: data, indexes: [], - dirty: true + dirty: true }); @@ -622,12 +657,13 @@ Phaser.Tilemap.prototype = { }, - // Region? Remove tile from map data? + /* createFromTiles: function (layer, tileIndex, key, frame, group) { if (typeof group === 'undefined') { group = this.game.world; } }, + */ /** * Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is @@ -635,7 +671,7 @@ Phaser.Tilemap.prototype = { * configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the * Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically. * - * @method Phaser.Tileset#createFromObjects + * @method Phaser.Tilemap#createFromObjects * @param {string} name - The name of the Object Group to create Sprites from. * @param {number} gid - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {string} key - The Game.cache key of the image that this Sprite will use. @@ -680,8 +716,10 @@ Phaser.Tilemap.prototype = { /** * Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. + * The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. + * Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. * - * @method Phaser.Tileset#createLayer + * @method Phaser.Tilemap#createLayer * @param {number|string} layer - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {number} [width] - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. * @param {number} [height] - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. @@ -716,7 +754,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on the layers name. * - * @method Phaser.Tileset#getIndex + * @method Phaser.Tilemap#getIndex * @protected * @param {array} location - The local array to search. * @param {string} name - The name of the array element to get. @@ -739,7 +777,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on its name. * - * @method Phaser.Tileset#getLayerIndex + * @method Phaser.Tilemap#getLayerIndex * @param {string} name - The name of the layer to get. * @return {number} The index of the layer in this tilemap, or null if not found. */ @@ -752,7 +790,7 @@ Phaser.Tilemap.prototype = { /** * Gets the tileset index based on its name. * - * @method Phaser.Tileset#getTilesetIndex + * @method Phaser.Tilemap#getTilesetIndex * @param {string} name - The name of the tileset to get. * @return {number} The index of the tileset in this tilemap, or null if not found. */ @@ -765,7 +803,7 @@ Phaser.Tilemap.prototype = { /** * Gets the image index based on its name. * - * @method Phaser.Tileset#getImageIndex + * @method Phaser.Tilemap#getImageIndex * @param {string} name - The name of the image to get. * @return {number} The index of the image in this tilemap, or null if not found. */ @@ -778,7 +816,7 @@ Phaser.Tilemap.prototype = { /** * Gets the object index based on its name. * - * @method Phaser.Tileset#getObjectIndex + * @method Phaser.Tilemap#getObjectIndex * @param {string} name - The name of the object to get. * @return {number} The index of the object in this tilemap, or null if not found. */ @@ -793,7 +831,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileIndexCallback + * @method Phaser.Tilemap#setTileIndexCallback * @param {number|array} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. * @param {function} callback - The callback that will be invoked when the tile is collided with. * @param {object} callbackContext - The context under which the callback is called. @@ -824,7 +862,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileLocationCallback + * @method Phaser.Tilemap#setTileLocationCallback * @param {number} x - X position of the top left of the area to copy (given in tiles, not pixels) * @param {number} y - Y position of the top left of the area to copy (given in tiles, not pixels) * @param {number} width - The width of the area to copy (given in tiles, not pixels) @@ -855,7 +893,7 @@ Phaser.Tilemap.prototype = { * Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollision + * @method Phaser.Tilemap#setCollision * @param {number|array} indexes - Either a single tile index, or an array of tile IDs to be checked for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -889,7 +927,7 @@ Phaser.Tilemap.prototype = { * Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionBetween + * @method Phaser.Tilemap#setCollisionBetween * @param {number} start - The first index of the tile to be set for collision. * @param {number} stop - The last index of the tile to be set for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. @@ -920,7 +958,7 @@ Phaser.Tilemap.prototype = { * Sets collision on all tiles in the given layer, except for the IDs of those in the given array. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionByExclusion + * @method Phaser.Tilemap#setCollisionByExclusion * @param {array} indexes - An array of the tile IDs to not be counted for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -949,7 +987,7 @@ Phaser.Tilemap.prototype = { * Sets collision values on a tile in the set. * You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion. * - * @method Phaser.Tileset#setCollisionByIndex + * @method Phaser.Tilemap#setCollisionByIndex * @protected * @param {number} index - The index of the tile on the layer. * @param {boolean} [collides=true] - If true it will enable collision on the tile. If false it will clear collision values from the tile. @@ -992,7 +1030,7 @@ Phaser.Tilemap.prototype = { /** * Gets the TilemapLayer index as used in the setCollision calls. * - * @method Phaser.Tileset#getLayer + * @method Phaser.Tilemap#getLayer * @protected * @param {number|string|Phaser.TilemapLayer} layer - The layer to operate on. If not given will default to this.currentLayer. * @return {number} The TilemapLayer index. @@ -1023,7 +1061,7 @@ Phaser.Tilemap.prototype = { /** * Internal function. * - * @method Phaser.Tileset#calculateFaces + * @method Phaser.Tilemap#calculateFaces * @protected * @param {number} layer - The index of the TilemapLayer to operate on. */ @@ -1080,7 +1118,7 @@ Phaser.Tilemap.prototype = { * Gets the tile above the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileAbove + * @method Phaser.Tilemap#getTileAbove * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -1100,7 +1138,7 @@ Phaser.Tilemap.prototype = { * Gets the tile below the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileBelow + * @method Phaser.Tilemap#getTileBelow * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -1120,7 +1158,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the left of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileLeft + * @method Phaser.Tilemap#getTileLeft * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -1140,7 +1178,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the right of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileRight + * @method Phaser.Tilemap#getTileRight * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -1197,7 +1235,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[y][x].index = tile; } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); } @@ -1357,7 +1395,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[ diffY + tileblock[i].y ][ diffX + tileblock[i].x ].copy(tileblock[i]); } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); }, @@ -1687,7 +1725,7 @@ Phaser.Tilemap.prototype.constructor = Phaser.Tilemap; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/TilemapLayer.js.html b/docs/TilemapLayer.js.html index 55dbec3d..2307e425 100644 --- a/docs/TilemapLayer.js.html +++ b/docs/TilemapLayer.js.html @@ -1330,7 +1330,7 @@ Object.defineProperty(Phaser.TilemapLayer.prototype, "collisionHeight", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/TilemapParser.js.html b/docs/TilemapParser.js.html index baca8969..450a3bef 100644 --- a/docs/TilemapParser.js.html +++ b/docs/TilemapParser.js.html @@ -828,7 +828,7 @@ Phaser.TilemapParser = { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Tileset.js.html b/docs/Tileset.js.html index b2ed4d1c..7e7a550f 100644 --- a/docs/Tileset.js.html +++ b/docs/Tileset.js.html @@ -606,7 +606,7 @@ Phaser.Tileset.prototype.constructor = Phaser.Tileset; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Time.js.html b/docs/Time.js.html index cabeeb5a..3c99a4be 100644 --- a/docs/Time.js.html +++ b/docs/Time.js.html @@ -797,7 +797,7 @@ Phaser.Time.prototype.constructor = Phaser.Time; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Timer.js.html b/docs/Timer.js.html index e225733f..4a99097c 100644 --- a/docs/Timer.js.html +++ b/docs/Timer.js.html @@ -959,7 +959,7 @@ Phaser.Timer.prototype.constructor = Phaser.Timer; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/TimerEvent.js.html b/docs/TimerEvent.js.html index 6d610604..4dce42e1 100644 --- a/docs/TimerEvent.js.html +++ b/docs/TimerEvent.js.html @@ -523,7 +523,7 @@ Phaser.TimerEvent.prototype.constructor = Phaser.TimerEvent; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Touch.js.html b/docs/Touch.js.html index 33e9adef..2090e268 100644 --- a/docs/Touch.js.html +++ b/docs/Touch.js.html @@ -821,7 +821,7 @@ Phaser.Touch.prototype.constructor = Phaser.Touch; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Tween.js.html b/docs/Tween.js.html index fc64b2b7..ba464c91 100644 --- a/docs/Tween.js.html +++ b/docs/Tween.js.html @@ -1029,7 +1029,7 @@ Phaser.Tween.prototype.constructor = Phaser.Tween; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/TweenManager.js.html b/docs/TweenManager.js.html index bec02b88..e00c738f 100644 --- a/docs/TweenManager.js.html +++ b/docs/TweenManager.js.html @@ -654,7 +654,7 @@ Phaser.TweenManager.prototype.constructor = Phaser.TweenManager; Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/Utils.js.html b/docs/Utils.js.html index 28d3ece2..c1f2c9d4 100644 --- a/docs/Utils.js.html +++ b/docs/Utils.js.html @@ -703,7 +703,7 @@ if (!Array.isArray) { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:36 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:11 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/World.js.html b/docs/World.js.html index bbb398a7..558e9499 100644 --- a/docs/World.js.html +++ b/docs/World.js.html @@ -794,7 +794,7 @@ Object.defineProperty(Phaser.World.prototype, "visible", { Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/classes.list.html b/docs/classes.list.html index 632608d5..92f451b8 100644 --- a/docs/classes.list.html +++ b/docs/classes.list.html @@ -788,7 +788,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/global.html b/docs/global.html index 2f5e07fa..68efab9d 100644 --- a/docs/global.html +++ b/docs/global.html @@ -567,7 +567,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/index.html b/docs/index.html index a930ba76..9f99be60 100644 --- a/docs/index.html +++ b/docs/index.html @@ -499,6 +499,7 @@
  • Fixed easing tween example case. Issue #379 (thanks wesleywerner)
  • Removed SAT.js UMD wrapped, fixes issue #361 (thanks luizbills)
  • Removed inContact check from Body.separate.
  • +
  • Fixed Tilemap docs (wrongly pointed to Tileset methods)
  • See the full Change Log for all the 1.1.4 updates and API changes (as there were a lot of them!)

    You can view the Change Log for all previous versions at https://github.com/photonstorm/phaser/changelog.md

    @@ -636,7 +637,7 @@ Sprites also have full Input support: click them, touch them, drag them around, Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/docs/namespaces.list.html b/docs/namespaces.list.html index 473458f5..056b19a4 100644 --- a/docs/namespaces.list.html +++ b/docs/namespaces.list.html @@ -788,7 +788,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Wed Feb 12 2014 15:23:37 GMT-0000 (GMT) using the DocStrap template. + on Wed Feb 12 2014 15:32:12 GMT-0000 (GMT) using the DocStrap template. diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index c227f20d..2f7bc69b 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -32,14 +32,49 @@ Phaser.Tilemap = function (game, key) { return; } + /** + * @property {number} width - The width of the map (in tiles). + */ this.width = data.width; + + /** + * @property {number} height - The height of the map (in tiles). + */ this.height = data.height; + + /** + * @property {number} tileWidth - The base width of the tiles in the map (in pixels). + */ this.tileWidth = data.tileWidth; + + /** + * @property {number} tileHeight - The base height of the tiles in the map (in pixels). + */ this.tileHeight = data.tileHeight; + + /** + * @property {string} orientation - The orientation of the map data (as specified in Tiled), usually 'orthogonal'. + */ this.orientation = data.orientation; + + /** + * @property {number} version - The version of the map data (as specified in Tiled, usually 1). + */ this.version = data.version; + + /** + * @property {object} properties - Map specific properties as specified in Tiled. + */ this.properties = data.properties; + + /** + * @property {number} widthInPixels - The width of the map in pixels based on width * tileWidth. + */ this.widthInPixels = data.widthInPixels; + + /** + * @property {number} heightInPixels - The height of the map in pixels based on height * tileHeight. + */ this.heightInPixels = data.heightInPixels; /** @@ -84,13 +119,13 @@ Phaser.Tilemap = function (game, key) { this._results = []; /** - * @property {number} _tempA - Internal var. + * @property {number} _tempA - Internal cache var. * @private */ this._tempA = 0; /** - * @property {number} _tempB - Internal var. + * @property {number} _tempB - Internal cache var. * @private */ this._tempB = 0; @@ -145,7 +180,7 @@ Phaser.Tilemap.prototype = { format: Phaser.Tilemap.CSV, data: data, indexes: [], - dirty: true + dirty: true }); @@ -191,12 +226,13 @@ Phaser.Tilemap.prototype = { }, - // Region? Remove tile from map data? + /* createFromTiles: function (layer, tileIndex, key, frame, group) { if (typeof group === 'undefined') { group = this.game.world; } }, + */ /** * Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is @@ -204,7 +240,7 @@ Phaser.Tilemap.prototype = { * configure Sprite properties from within the map editor. For example giving an object a property if alpha: 0.5 in the map editor will duplicate that when the * Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically. * - * @method Phaser.Tileset#createFromObjects + * @method Phaser.Tilemap#createFromObjects * @param {string} name - The name of the Object Group to create Sprites from. * @param {number} gid - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {string} key - The Game.cache key of the image that this Sprite will use. @@ -249,8 +285,10 @@ Phaser.Tilemap.prototype = { /** * Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. + * The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. + * Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. * - * @method Phaser.Tileset#createLayer + * @method Phaser.Tilemap#createLayer * @param {number|string} layer - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. * @param {number} [width] - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. * @param {number} [height] - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. @@ -285,7 +323,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on the layers name. * - * @method Phaser.Tileset#getIndex + * @method Phaser.Tilemap#getIndex * @protected * @param {array} location - The local array to search. * @param {string} name - The name of the array element to get. @@ -308,7 +346,7 @@ Phaser.Tilemap.prototype = { /** * Gets the layer index based on its name. * - * @method Phaser.Tileset#getLayerIndex + * @method Phaser.Tilemap#getLayerIndex * @param {string} name - The name of the layer to get. * @return {number} The index of the layer in this tilemap, or null if not found. */ @@ -321,7 +359,7 @@ Phaser.Tilemap.prototype = { /** * Gets the tileset index based on its name. * - * @method Phaser.Tileset#getTilesetIndex + * @method Phaser.Tilemap#getTilesetIndex * @param {string} name - The name of the tileset to get. * @return {number} The index of the tileset in this tilemap, or null if not found. */ @@ -334,7 +372,7 @@ Phaser.Tilemap.prototype = { /** * Gets the image index based on its name. * - * @method Phaser.Tileset#getImageIndex + * @method Phaser.Tilemap#getImageIndex * @param {string} name - The name of the image to get. * @return {number} The index of the image in this tilemap, or null if not found. */ @@ -347,7 +385,7 @@ Phaser.Tilemap.prototype = { /** * Gets the object index based on its name. * - * @method Phaser.Tileset#getObjectIndex + * @method Phaser.Tilemap#getObjectIndex * @param {string} name - The name of the object to get. * @return {number} The index of the object in this tilemap, or null if not found. */ @@ -362,7 +400,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileIndexCallback + * @method Phaser.Tilemap#setTileIndexCallback * @param {number|array} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. * @param {function} callback - The callback that will be invoked when the tile is collided with. * @param {object} callbackContext - The context under which the callback is called. @@ -393,7 +431,7 @@ Phaser.Tilemap.prototype = { * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @method Phaser.Tileset#setTileLocationCallback + * @method Phaser.Tilemap#setTileLocationCallback * @param {number} x - X position of the top left of the area to copy (given in tiles, not pixels) * @param {number} y - Y position of the top left of the area to copy (given in tiles, not pixels) * @param {number} width - The width of the area to copy (given in tiles, not pixels) @@ -424,7 +462,7 @@ Phaser.Tilemap.prototype = { * Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollision + * @method Phaser.Tilemap#setCollision * @param {number|array} indexes - Either a single tile index, or an array of tile IDs to be checked for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -458,7 +496,7 @@ Phaser.Tilemap.prototype = { * Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionBetween + * @method Phaser.Tilemap#setCollisionBetween * @param {number} start - The first index of the tile to be set for collision. * @param {number} stop - The last index of the tile to be set for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. @@ -489,7 +527,7 @@ Phaser.Tilemap.prototype = { * Sets collision on all tiles in the given layer, except for the IDs of those in the given array. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @method Phaser.Tileset#setCollisionByExclusion + * @method Phaser.Tilemap#setCollisionByExclusion * @param {array} indexes - An array of the tile IDs to not be counted for collision. * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. * @param {number|string|Phaser.TilemapLayer} [layer] - The layer to operate on. If not given will default to this.currentLayer. @@ -518,7 +556,7 @@ Phaser.Tilemap.prototype = { * Sets collision values on a tile in the set. * You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion. * - * @method Phaser.Tileset#setCollisionByIndex + * @method Phaser.Tilemap#setCollisionByIndex * @protected * @param {number} index - The index of the tile on the layer. * @param {boolean} [collides=true] - If true it will enable collision on the tile. If false it will clear collision values from the tile. @@ -561,7 +599,7 @@ Phaser.Tilemap.prototype = { /** * Gets the TilemapLayer index as used in the setCollision calls. * - * @method Phaser.Tileset#getLayer + * @method Phaser.Tilemap#getLayer * @protected * @param {number|string|Phaser.TilemapLayer} layer - The layer to operate on. If not given will default to this.currentLayer. * @return {number} The TilemapLayer index. @@ -592,7 +630,7 @@ Phaser.Tilemap.prototype = { /** * Internal function. * - * @method Phaser.Tileset#calculateFaces + * @method Phaser.Tilemap#calculateFaces * @protected * @param {number} layer - The index of the TilemapLayer to operate on. */ @@ -649,7 +687,7 @@ Phaser.Tilemap.prototype = { * Gets the tile above the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileAbove + * @method Phaser.Tilemap#getTileAbove * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -669,7 +707,7 @@ Phaser.Tilemap.prototype = { * Gets the tile below the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileBelow + * @method Phaser.Tilemap#getTileBelow * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -689,7 +727,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the left of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileLeft + * @method Phaser.Tilemap#getTileLeft * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -709,7 +747,7 @@ Phaser.Tilemap.prototype = { * Gets the tile to the right of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @method Phaser.Tileset#getTileRight + * @method Phaser.Tilemap#getTileRight * @param {number} layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). * @param {number} x - The x coordinate to get the tile from. In tiles, not pixels. * @param {number} y - The y coordinate to get the tile from. In tiles, not pixels. @@ -766,7 +804,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[y][x].index = tile; } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); } @@ -926,7 +964,7 @@ Phaser.Tilemap.prototype = { this.layers[layer].data[ diffY + tileblock[i].y ][ diffX + tileblock[i].x ].copy(tileblock[i]); } - this.layers[layer].dirty = true; + this.layers[layer].dirty = true; this.calculateFaces(layer); },