emp751 Posted February 6, 2017 Share Posted February 6, 2017 Hey. So I'm trying to fade an array of tiles in and out by tweening their alpha's: var tween = game.add.tween(tiles).to(properties, duration, easing, autoStart, delay, repeat, yoyo); tiles.layer.dirty = true; But this doesn't work. I think because layer.dirty is being set to false right after I set it to true. I've tried using map.createFromObjects (http://phaser.io/docs/2.4.4/Phaser.Tilemap.html#createFromObjects) and map.createFromTiles in an attempt to temporarily turn tiles into sprites as I guessed that maybe tweens only work with sprites but I'm not sure those methods were intended to be used for my purposes... Could someone point me in the right direction? Cheers Link to comment Share on other sites More sharing options...
mwissink Posted February 6, 2017 Share Posted February 6, 2017 I would point you in the direction of the Tilemap Layer. It renders a specific part of a tilemap as a sprite, so that you can tween and do other stuff to it https://www.phaser.io/docs/2.6.2/Phaser.TilemapLayer.html Link to comment Share on other sites More sharing options...
Recommended Posts