Added callbacks and extra properties.

This commit is contained in:
photonstorm 2017-07-18 13:54:01 +01:00
parent 7bcfb0ed6c
commit 3f13659534

View file

@ -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
};
};