Skip to content

Commit 07724e5

Browse files
committed
Revamping the examples area.
1 parent 82df8c9 commit 07724e5

380 files changed

Lines changed: 8620 additions & 10708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/build.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$buildLog = "Building version $version \n\n";
99
$header = "";
1010

11-
$js = file(dirname(__FILE__) . '/../examples/js.php');
11+
$js = file(dirname(__FILE__) . '/../examples/phaser-debug-js.php');
1212
$output = "";
1313

1414
for ($i = 0; $i < count($js); $i++)

build/phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* Phaser - http://www.phaser.io
1111
*
12-
* v1.0.7 - Built at: Fri, 18 Oct 2013 01:36:29 +0100
12+
* v1.0.7 - Built at: Tue, 22 Oct 2013 00:54:52 +0100
1313
*
1414
* By Richard Davey http://www.photonstorm.com @photonstorm
1515
*

examples/animation/animation wraparound.php

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render });
3+
4+
function preload() {
5+
6+
game.load.atlasJSONHash('bot', 'assets/sprites/running_bot.png', 'assets/sprites/running_bot.json');
7+
game.load.spritesheet('mummy', 'assets/sprites/metalslug_mummy37x45.png', 37, 45, 18);
8+
9+
}
10+
11+
var bot;
12+
13+
function create() {
14+
15+
bot = game.add.sprite(200, 200, 'bot');
16+
17+
bot.animations.add('run');
18+
19+
bot.animations.play('run', 15, true);
20+
21+
game.input.onDown.addOnce(changeMummy, this);
22+
23+
}
24+
25+
function changeMummy() {
26+
27+
bot.loadTexture('mummy', 0);
28+
29+
bot.animations.add('walk');
30+
31+
bot.animations.play('walk', 30, true);
32+
33+
}
34+
35+
function render() {
36+
37+
game.debug.renderSpriteBounds(bot);
38+
39+
}

examples/animation/change texture.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

examples/animation/from a JSON object.php

Lines changed: 0 additions & 144 deletions
This file was deleted.

examples/animation/from a texturePacker file.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)