Skip to content

Commit

Permalink
Revamping the examples area.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Oct 22, 2013
1 parent 82df8c9 commit 07724e5
Show file tree
Hide file tree
Showing 380 changed files with 8,620 additions and 10,708 deletions.
2 changes: 1 addition & 1 deletion build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$buildLog = "Building version $version \n\n";
$header = "";

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

for ($i = 0; $i < count($js); $i++)
Expand Down
2 changes: 1 addition & 1 deletion build/phaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* Phaser - http://www.phaser.io
*
* v1.0.7 - Built at: Fri, 18 Oct 2013 01:36:29 +0100
* v1.0.7 - Built at: Tue, 22 Oct 2013 00:54:52 +0100
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down
52 changes: 0 additions & 52 deletions examples/animation/animation wraparound.php

This file was deleted.

39 changes: 39 additions & 0 deletions examples/animation/change texture on click.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render });

function preload() {

game.load.atlasJSONHash('bot', 'assets/sprites/running_bot.png', 'assets/sprites/running_bot.json');
game.load.spritesheet('mummy', 'assets/sprites/metalslug_mummy37x45.png', 37, 45, 18);

}

var bot;

function create() {

bot = game.add.sprite(200, 200, 'bot');

bot.animations.add('run');

bot.animations.play('run', 15, true);

game.input.onDown.addOnce(changeMummy, this);

}

function changeMummy() {

bot.loadTexture('mummy', 0);

bot.animations.add('walk');

bot.animations.play('walk', 30, true);

}

function render() {

game.debug.renderSpriteBounds(bot);

}
51 changes: 0 additions & 51 deletions examples/animation/change texture.php

This file was deleted.

144 changes: 0 additions & 144 deletions examples/animation/from a JSON object.php

This file was deleted.

38 changes: 0 additions & 38 deletions examples/animation/from a texturePacker file.php

This file was deleted.

Loading

0 comments on commit 07724e5

Please sign in to comment.