Skip to content

Commit 3f13659

Browse files
committed
Added callbacks and extra properties.
1 parent 7bcfb0e commit 3f13659

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

v3/src/input/InteractiveObject.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
var NOOP = require('../utils/NOOP');
2+
13
// Phaser.Input.InteractiveObject
24

35
var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
46
{
57
return {
68
gameObject: gameObject,
79

10+
enabled: true,
11+
812
hitArea: hitArea,
913
hitAreaCallback: hitAreaCallback,
1014

@@ -13,8 +17,14 @@ var InteractiveObject = function (gameObject, hitArea, hitAreaCallback)
1317

1418
isOver: false,
1519
isDown: false,
20+
isDragged: false,
21+
22+
callbackContext: gameObject,
1623

17-
isDragged: false
24+
onDown: NOOP,
25+
onUp: NOOP,
26+
onOver: NOOP,
27+
onOut: NOOP
1828
};
1929
};
2030

0 commit comments

Comments
 (0)