New polygon collision object examples and Body scale fixes.

This commit is contained in:
photonstorm
2014-01-31 10:34:18 +00:00
parent 45b6d5a741
commit 27fc447928
28 changed files with 2080 additions and 1295 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ function update() {
// sprite.body.velocity.x = 0;
// sprite.body.velocity.y = 0;
// sprite.body.angularVelocity = 0;
sprite.body.angularVelocity = 0;
// sprite.body.acceleration.x = 0;
// sprite.body.angularAcceleration = 0;
+2 -8
View File
@@ -29,7 +29,7 @@ function create() {
// Basically this sets EVERY SINGLE tile to fully collide on all faces
map.setCollisionByExclusion([7, 32, 35, 36, 47]);
layer.debug = true;
// layer.debug = true;
layer.resizeWorld();
@@ -43,13 +43,10 @@ function create() {
emitter.gravity = 150;
emitter.bounce.setTo(0.5, 0.5);
sprite = game.add.sprite(450, 80, 'phaser');
sprite = game.add.sprite(200, 70, 'phaser');
sprite.anchor.setTo(0.5, 0.5);
game.camera.follow(sprite);
// game.camera.deadzone = new Phaser.Rectangle(160, 160, layer.renderWidth-320, layer.renderHeight-320);
// game.input.onDown.add(particleBurst, this);
}
@@ -57,9 +54,6 @@ function particleBurst() {
emitter.x = sprite.x;
emitter.y = sprite.y;
// emitter.x = game.input.worldX;
// emitter.y = game.input.worldY;
// emitter.start(true, 4000, null, 10);
emitter.start(true, 2000, null, 1);
}