mirror of
https://github.com/wassname/phaser.git
synced 2026-10-30 13:30:49 +08:00
Fixed the Sprite / World / Group body issue. So invaders now works again, as do the new examples.
This commit is contained in:
1 parent
3488880956
commit
28f71ed86d
4 files changed
+61
-39
No files matched your search
@@ -300,5 +300,7 @@ function render() {
|
||||
{
|
||||
game.debug.renderPhysicsBody(aliens._container.children[i].body);
|
||||
}
|
||||
|
||||
game.debug.renderPhysicsBody(player.body);
|
||||
|
||||
}
|
||||
@@ -114,7 +114,9 @@ function createAliens () {
|
||||
}
|
||||
*/
|
||||
|
||||
bob = aliens.create(48, 50, 'invader');
|
||||
bob = game.add.sprite(32, 32, 'invader');
|
||||
|
||||
// bob = aliens.create(48, 50, 'invader');
|
||||
|
||||
bob.debug = true;
|
||||
|
||||
@@ -145,8 +147,9 @@ console.log('descend');
|
||||
|
||||
function update() {
|
||||
|
||||
aliens.x += 1;
|
||||
// bob.body.velocity.x = 100;
|
||||
// aliens.x += 1;
|
||||
bob.body.velocity.x = 100;
|
||||
// bob.body.velocity.y = 100;
|
||||
|
||||
// Scroll the background
|
||||
// starfield.tilePosition.y += 2;
|
||||
@@ -325,7 +328,9 @@ function render() {
|
||||
|
||||
for (var i = 0; i < aliens._container.children.length; i++)
|
||||
{
|
||||
game.debug.renderPhysicsBody(aliens._container.children[i].body);
|
||||
// game.debug.renderPhysicsBody(aliens._container.children[i].body);
|
||||
}
|
||||
|
||||
|
||||
game.debug.renderPhysicsBody(bob.body);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user