diff --git a/examples/wip/contact2.js b/examples/wip/contact2.js index 5b7e616b..df91bcf1 100644 --- a/examples/wip/contact2.js +++ b/examples/wip/contact2.js @@ -23,14 +23,14 @@ function create() { bg = game.add.tileSprite(0, 0, 800, 600, 'background'); bg.fixedToCamera = true; - game.physics.gravity.y = 20; + // game.physics.gravity.y = 20; game.physics.friction = 0.5; game.physics.setBoundsToWorld(); var playerCG = game.physics.createCollisionGroup(); var boxCG = game.physics.createCollisionGroup(); - player = game.add.sprite(50, 400, 'dude'); + player = game.add.sprite(50, 550, 'dude'); player.physicsEnabled = true; player.body.fixedRotation = true; player.body.setCollisionGroup(playerCG); diff --git a/resources/Screen Shots/phaser-p2-cannon.png b/resources/Screen Shots/phaser-p2-cannon.png new file mode 100644 index 00000000..b20b0102 Binary files /dev/null and b/resources/Screen Shots/phaser-p2-cannon.png differ diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 2b84786e..6620b553 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -477,7 +477,7 @@ Phaser.Button.prototype.onInputOverHandler = function (sprite, pointer) { * Internal function that handles input events. * * @protected -* @method Phaser.Button.prototype.onInputOverHandler +* @method Phaser.Button.prototype.onInputOutHandler * @param {Phaser.Button} sprite - The Button that the event occured on. * @param {Phaser.Pointer} pointer - The Pointer that activated the Button. */ @@ -503,7 +503,7 @@ Phaser.Button.prototype.onInputOutHandler = function (sprite, pointer) { * Internal function that handles input events. * * @protected -* @method Phaser.Button.prototype.onInputOverHandler +* @method Phaser.Button.prototype.onInputDownHandler * @param {Phaser.Button} sprite - The Button that the event occured on. * @param {Phaser.Pointer} pointer - The Pointer that activated the Button. */ @@ -529,7 +529,7 @@ Phaser.Button.prototype.onInputDownHandler = function (sprite, pointer) { * Internal function that handles input events. * * @protected -* @method Phaser.Button.prototype.onInputOverHandler +* @method Phaser.Button.prototype.onInputUpHandler * @param {Phaser.Button} sprite - The Button that the event occured on. * @param {Phaser.Pointer} pointer - The Pointer that activated the Button. */ diff --git a/src/physics/World.js b/src/physics/World.js index 845bb18a..501f5f70 100644 --- a/src/physics/World.js +++ b/src/physics/World.js @@ -244,6 +244,9 @@ Phaser.Physics.World.prototype = { */ beginContactHandler: function (event) { + console.log('beginContactHandler'); + console.log(event); + if (event.bodyA.id > 1 && event.bodyB.id > 1) { // console.log('beginContactHandler'); @@ -262,6 +265,10 @@ Phaser.Physics.World.prototype = { */ endContactHandler: function (event) { + console.log('endContactHandler'); + console.log(event); + + if (event.bodyA.id > 1 && event.bodyB.id > 1) { // console.log('endContactHandler');