Skip to content

Commit 6efeb2c

Browse files
committed
Added hitArea property and setHitArea method
1 parent 3afe6d8 commit 6efeb2c

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: 'ff2ba330-671a-11e7-ade7-abb54a342c15'
2+
build: '3f89fe30-6767-11e7-a84d-c5c9fa126d36'
33
};
44
module.exports = CHECKSUM;

v3/src/gameobjects/GameObject.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ var GameObject = new Class({
3636
this.renderMask = 15;
3737
this.renderFlags = 15;
3838

39+
this.hitArea = null;
40+
this.hitAreaCallback = null;
41+
3942
// Trigger a state z-depth sort
4043
this.state.sys.sortChildrenFlag = true;
4144
},
@@ -53,6 +56,14 @@ var GameObject = new Class({
5356
{
5457
},
5558

59+
setHitArea: function (shape, callback)
60+
{
61+
this.hitArea = shape;
62+
this.hitAreaCallback = callback;
63+
64+
return this;
65+
},
66+
5667
// Can be overridden by custom Game Objects, but provides default export functionality
5768
toJSON: function ()
5869
{

0 commit comments

Comments
 (0)