diff --git a/examples/games/tanks.js b/examples/games/tanks.js index 010c58a3..47c7401e 100644 --- a/examples/games/tanks.js +++ b/examples/games/tanks.js @@ -125,7 +125,7 @@ function create () { // tank.play('move'); // This will force it to decelerate and limit its speed - tank.body.drag.setTo(200, 200); + tank.body.friction = 0.2; tank.body.maxVelocity.setTo(400, 400); tank.body.collideWorldBounds = true; diff --git a/examples/games/wabbits.js b/examples/games/wabbits.js index 28055d11..56084153 100644 --- a/examples/games/wabbits.js +++ b/examples/games/wabbits.js @@ -42,7 +42,7 @@ function create() { wab.name = 'wab' + i; wab.body.collideWorldBounds = true; wab.body.mass = 0.1; - wab.body.drag.setTo(50, 50); + wab.body.friction = 0.2; } hill = game.add.sprite(450, 400, 'hill'); @@ -53,7 +53,7 @@ function create() { block = game.add.sprite(575, 300, 'block'); block.body.collideWorldBounds = true; block.body.mass = 5; - block.body.drag.setTo(100, 100); + block.body..friction = 0.4; analog = game.add.sprite(200, 450, 'analog'); analog.body.allowGravity = false; @@ -72,7 +72,7 @@ function create() { ball.inputEnabled = true; ball.body.collideWorldBounds = true; ball.body.bounce.setTo(0.9, 0.9); - ball.body.drag.setTo(100, 100); + ball.body..friction = 0.2; // Enable input. ball.input.start(0, true); diff --git a/examples/input/gamepad tanks.js b/examples/input/gamepad tanks.js index 9626d9e2..3ed381ad 100644 --- a/examples/input/gamepad tanks.js +++ b/examples/input/gamepad tanks.js @@ -133,7 +133,7 @@ function create () { // tank.play('move'); // This will force it to decelerate and limit its speed - tank.body.drag.setTo(200, 200); + tank.body.friction = 0.2; tank.body.maxVelocity.setTo(400, 400); tank.body.collideWorldBounds = true; diff --git a/examples/physics/launcher follow world.js b/examples/physics/launcher follow world.js index 3a0dd734..3d9338b7 100644 --- a/examples/physics/launcher follow world.js +++ b/examples/physics/launcher follow world.js @@ -42,7 +42,7 @@ function create() { player.anchor.setTo(0.5, 0.5); player.body.collideWorldBounds = true; player.body.bounce.setTo(0.9, 0.9); - player.body.drag.setTo(100, 100); + player.body.friction = 0.2; player.body.gravity.setTo(0, 8); // Enable input. diff --git a/examples/physics/launcher follow.js b/examples/physics/launcher follow.js index 49ef1c69..c1cacf04 100644 --- a/examples/physics/launcher follow.js +++ b/examples/physics/launcher follow.js @@ -37,7 +37,7 @@ function create() { player.anchor.setTo(0.5, 0.5); player.body.collideWorldBounds = true; player.body.bounce.setTo(0.9, 0.9); - player.body.drag.setTo(50, 50); + player.body.friction = 0.2; // Enable input. player.inputEnabled = true; diff --git a/examples/physics/launcher.js b/examples/physics/launcher.js index 8616f37a..19fcb25f 100644 --- a/examples/physics/launcher.js +++ b/examples/physics/launcher.js @@ -42,7 +42,6 @@ function create() { ball.anchor.setTo(0.5, 0.5); ball.body.collideWorldBounds = true; ball.body.bounce.setTo(0.9, 0.9); - ball.body.drag.setTo(10, 0); // Enable input. ball.inputEnabled = true; diff --git a/examples/wip/acceleration.js b/examples/wip/acceleration.js index 8d40cc5a..5b9438dd 100644 --- a/examples/wip/acceleration.js +++ b/examples/wip/acceleration.js @@ -29,10 +29,7 @@ function create() { car.body.collideWorldBounds = true; car.body.bounce.setTo(0.8, 0.8); car.body.allowRotation = true; - car.body.friction = 10; - - // car.body.drag.x = 10; - // car.body.drag.y = 10; + car.body.friction = 0.4; // car.body.acceleration.x = 10; game.input.onDown.add(start, this); diff --git a/examples/wip/platform.js b/examples/wip/platform.js index 8f142578..89e7480f 100644 --- a/examples/wip/platform.js +++ b/examples/wip/platform.js @@ -46,7 +46,6 @@ function launch() { } - function hit(face, body1, body2) { console.log('hit', face);