/Phaser-Rotate-Sprite-Extension

Rotate Sprite Extension for Phaser Framework

Primary LanguageJavaScriptMIT LicenseMIT

Rotate Sprite Extension for Phaser Framework

Rotate Sprite Extension

Demo

Do you want to see this extension in action? Visit http://codepen.io/jdnichollsc/full/PGWQVd/ yay!

Full Example

var game = new Phaser.Game(w, h, Phaser.AUTO, '', {
    //...
    preload: function(){
      this.game.load.image('ionPhaser', ionPhaserUrl);
      this.game.load.image('rotate', rotateUrl);
    },
    create: function(){
      this.sprite = new Phaser.Extension.RotateSprite(this.game, this.game.world.centerX, this.game.world.centerY, 'ionPhaser');
    }
    //...
});

Other Projects

Happy scrolling

Made with <3