Jump to content

Trying to tween tiles


Recommended Posts

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?



Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...