This commit is contained in:
Webeled
2013-10-11 22:29:50 +01:00
parent 3acdad92cb
commit eb98998046
25 changed files with 1335 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
$title = "Primary bubble example";
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('space', 'assets/misc/starfield.png', 138, 15);
game.load.image('ball', 'assets/sprites/shinyball.png');
}
function create() {
game.add.tileSprite(0,0,800,600,'space');
for(var i=0;i<30;i++){
var sprite=game.add.sprite(game.world.randomX,game.world.randomY,'ball');
//Fade in a sprite :
game.add.tween(sprite)
.to({y : -50},Math.random()*4500,Phaser.Easing.Cubic.Out)
.start();
game.add.tween(sprite)
.to({alpha : 0},Math.random()*4500,Phaser.Easing.Quadratic.InOut)
.delay(Math.random()*500)
.start();
}
}
</script>
<?php
require('../foot.php');
?>