2017-07-18 12:54:01 +00:00
|
|
|
var NOOP = require('../utils/NOOP');
|
|
|
|
|
2017-07-18 01:36:45 +00:00
|
|
|
// Phaser.Input.InteractiveObject
|
|
|
|
|
|
|
|
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
|
|
|
|
{
|
|
|
|
return {
|
|
|
|
gameObject: gameObject,
|
|
|
|
|
2017-07-18 12:54:01 +00:00
|
|
|
enabled: true,
|
2017-07-18 16:22:14 +00:00
|
|
|
draggable: false,
|
2017-07-18 12:54:01 +00:00
|
|
|
|
2017-07-18 01:36:45 +00:00
|
|
|
hitArea: hitArea,
|
|
|
|
hitAreaCallback: hitAreaCallback,
|
|
|
|
|
|
|
|
localX: 0,
|
|
|
|
localY: 0,
|
|
|
|
|
|
|
|
isOver: false,
|
|
|
|
isDown: false,
|
2017-07-18 12:54:01 +00:00
|
|
|
isDragged: false,
|
|
|
|
|
|
|
|
callbackContext: gameObject,
|
2017-07-18 01:36:45 +00:00
|
|
|
|
2017-07-18 12:54:01 +00:00
|
|
|
onDown: NOOP,
|
|
|
|
onUp: NOOP,
|
|
|
|
onOver: NOOP,
|
|
|
|
onOut: NOOP
|
2017-07-18 01:36:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = InteractiveObject;
|