November 2019
Beginner
436 pages
8h 52m
English
Let's learn how to can render a sprite:
function preload() { this.load.setBaseURL('.'); this.load.image('background', 'assets/background.jpg'); this.load.image('ship', 'assets/phaser-ship.png'); }
const game = new Phaser.Game(config); let ship;
// Create ship ship = this.add.sprite(100, 100, 'ship');
Notice how we passed the initial coordinates ...
Read now
Unlock full access