-
-
Save videlais/f3d903a49d3d72f65bd6 to your computer and use it in GitHub Desktop.
Phaser Sprite Basics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var game = new Phaser.Game( | |
200, //The width in pixels | |
200, //The height in pixels | |
Phaser.AUTO, //The render system | |
"phaser", //The element | |
{ | |
create: create, // The create function | |
update: update // The update function | |
} | |
); | |
function create() { | |
var sprite = game.add.sprite( | |
20, // The 'x' position | |
20, // The 'y' position | |
'sprite' // The image-cache name | |
); | |
} | |
function update() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment