mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Fix typos of method names in Button.js for doc #444
This commit is contained in:
@@ -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);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user