mirror of
https://github.com/photonstorm/phaser
synced 2024-12-11 22:03:09 +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
|
||||
|
||||
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
||||
|
@ -5,6 +7,8 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
|||
return {
|
||||
gameObject: gameObject,
|
||||
|
||||
enabled: true,
|
||||
|
||||
hitArea: hitArea,
|
||||
hitAreaCallback: hitAreaCallback,
|
||||
|
||||
|
@ -13,8 +17,14 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
|||
|
||||
isOver: false,
|
||||
isDown: false,
|
||||
isDragged: false,
|
||||
|
||||
isDragged: false
|
||||
callbackContext: gameObject,
|
||||
|
||||
onDown: NOOP,
|
||||
onUp: NOOP,
|
||||
onOver: NOOP,
|
||||
onOut: NOOP
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue