Jump to content

yoyo a tween with an array of properties


Mike018
 Share

Recommended Posts

7 hours ago, samme said:

Example?

let flyAround = this.game.add.tween(this).to(
     {
       x: 
         [
         this.game.world.width - 100,
         100,
         this.game.world.centerX,
         this.game.world.centerX
         ],
       y: 
         [
         this.game.world.centerY - 100,
         this.game.world.height - 100,
         100,
         this.game.world.centerY
         ]
       },
       8000,
       Phaser.Easing.Quadratic.InOut,
       true, 0, -1, true
     );

The sprite will just disappear at the end of the first loop and start at the beginning without reversing. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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