Loads of new examples, some more bug fixes, all of them work beautifully

This commit is contained in:
Webeled
2013-10-14 19:32:07 +01:00
parent faf432bdb0
commit 969fa46484
24 changed files with 400 additions and 38 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
$title = "Scaling a sprite";
require('../head.php');
?>
<script type="text/javascript">
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create});
function preload() {
game.load.image('disk', 'assets/sprites/darkwing_crazy.png');
}
function create() {
for(var i=0;i<15;i++){
var sprite=game.add.sprite(game.world.randomX, game.world.randomY, 'disk');
var rand=game.rnd.realInRange(-2,6);
sprite.scale.setTo(rand,rand);
}
}
</script>
<?php
require('../foot.php');
?>