Group now extends PIXI.DisplayObjectContainer, rather than owning a _container property, which makes life a whole lot easier re: nesting.

This commit is contained in:
photonstorm
2014-02-06 02:31:36 +00:00
parent 9737710200
commit 4cfce8b4d2
89 changed files with 1176 additions and 1521 deletions
+29
View File
@@ -0,0 +1,29 @@
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create });
function preload() {
game.load.image('ball', 'assets/sprites/yellow_ball.png');
}
var ball;
function create() {
ball = game.add.sprite(300, 0, 'ball');
TweenLite.to(ball, 10, { y: 400 });
}
function startBounceTween() {
// ball.y = 0;
// var bounce=game.add.tween(ball);
// bounce.to({ y: game.world.height-ball.height }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.In);
// bounce.onComplete.add(startBounceTween, this);
// bounce.start();
}