Load the player's photo and store it in the Texture Manager, ready for use in-game.
This method works by using a Scene Loader instance and then asking the Loader to retrieve the image.
When complete the plugin will emit a photocomplete
event, along with the key of the photo.
this.facebook.loadPlayerPhoto(this, 'player').once('photocomplete', function (key) {
this.add.image(x, y, 'player');
}, this);
name | type | description |
---|---|---|
scene | Phaser.Scene |
The Scene that will be responsible for loading this photo. |
key | string |
The key to use when storing the photo in the Texture Manager. |
This Facebook Instant Games Plugin instance.