Tweens have a new event: onLoop.

Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete.
Lots of documentation fixes in the Tween class.
Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite)
Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
This commit is contained in:
photonstorm
2013-12-18 13:02:01 +00:00
parent b2c680811b
commit f991f9cee8
6 changed files with 159 additions and 51 deletions
+34
View File
@@ -89,8 +89,42 @@ Phaser.Tilemap.prototype = {
addTilesets: function (tilesets) {
// { "TiledKey": "TilesetKey" }
// parse the tilesets array and set-up gid mappings
// "tilesets":[
// {
// "firstgid":1,
// "image":"SuperMarioBros-World1-1_bank.png",
// "imageheight":64,
// "imagewidth":176,
// "margin":0,
// "name":"SuperMarioBros-World1-1_bank.png",
// "properties":
// {
// },
// "spacing":0,
// "tileheight":16,
// "tilewidth":16
// }],
//this.layers = this.game.cache.getTilemapData(key).layers;
var mapTilesets = this.game.cache.getTilemapData(this.key).tilesets;
for (var tileset in tilesets)
{
for (var i = 0; i < mapTilesets.length; i++)
{
if (mapTilesets[i].name === tilesets[tileset])
{
}
}
}
},