Jump to content

2.4.2 loadTexture


icp
 Share

Recommended Posts

this.spriteTween = this.game.add.tween(this.sprite);

this.spriteTween.to({angle: 180}, 1000, Phaser.Easing.Linear.None, false, 0);

this.spriteTween.onStart.add(startIt, this);

this.spriteTween.onComplete.add(resetIt, this);

function startIt() {

this.sprite.loadTexture('monster');

}

function resetIt(){

this.sprite.loadTexture('hero');

}

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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