mirror of
https://github.com/photonstorm/phaser
synced 2024-12-04 02:20:23 +00:00
Added callbacks and extra properties.
This commit is contained in:
parent
7bcfb0ed6c
commit
3f13659534
1 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
var NOOP = require('../utils/NOOP');
|
||||||
|
|
||||||
// Phaser.Input.InteractiveObject
|
// Phaser.Input.InteractiveObject
|
||||||
|
|
||||||
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
||||||
|
@ -5,6 +7,8 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
||||||
return {
|
return {
|
||||||
gameObject: gameObject,
|
gameObject: gameObject,
|
||||||
|
|
||||||
|
enabled: true,
|
||||||
|
|
||||||
hitArea: hitArea,
|
hitArea: hitArea,
|
||||||
hitAreaCallback: hitAreaCallback,
|
hitAreaCallback: hitAreaCallback,
|
||||||
|
|
||||||
|
@ -13,8 +17,14 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
||||||
|
|
||||||
isOver: false,
|
isOver: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
|
isDragged: false,
|
||||||
|
|
||||||
isDragged: false
|
callbackContext: gameObject,
|
||||||
|
|
||||||
|
onDown: NOOP,
|
||||||
|
onUp: NOOP,
|
||||||
|
onOver: NOOP,
|
||||||
|
onOut: NOOP
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue