mirror of
https://github.com/wassname/phaser.git
synced 2026-10-02 12:30:54 +08:00
New Examples area finished, README updated. Getting closer to 1.1 release.
This commit is contained in:
1 parent
cab3b53cf0
commit
f1f42e4d41
16 files changed
+351
-662
No files matched your search
@@ -0,0 +1,22 @@
|
||||
|
||||
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create });
|
||||
|
||||
function preload() {
|
||||
|
||||
// You can fill the preloader with as many assets as your game requires
|
||||
|
||||
// Here we are loading an image. The first parameter is the unique
|
||||
// string by which we'll identify the image later in our code.
|
||||
|
||||
// The second parameter is the URL of the image (relative)
|
||||
game.load.image('einstein', 'assets/pics/ra_einstein.png');
|
||||
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
||||
// This creates a simple sprite that is using our loaded image and
|
||||
// displays it on-screen
|
||||
game.add.sprite(0, 0, 'einstein');
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user