mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Added SetHitArea action
This commit is contained in:
parent
7528b6e5a9
commit
ad540d95bc
4 changed files with 21 additions and 1 deletions
11
v3/src/actions/SetHitArea.js
Normal file
11
v3/src/actions/SetHitArea.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
var SetHitArea = function (items, hitArea, hitAreaCallback)
|
||||
{
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
items[i].setHitArea(hitArea, hitAreaCallback);
|
||||
}
|
||||
|
||||
return items;
|
||||
};
|
||||
|
||||
module.exports = SetHitArea;
|
|
@ -27,6 +27,7 @@ module.exports = {
|
|||
ScaleXY: require('./ScaleXY'),
|
||||
ScaleY: require('./ScaleY'),
|
||||
SetAlpha: require('./SetAlpha'),
|
||||
SetHitArea: require('./SetHitArea'),
|
||||
SetOrigin: require('./SetOrigin'),
|
||||
SetRotation: require('./SetRotation'),
|
||||
SetScale: require('./SetScale'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '3f89fe30-6767-11e7-a84d-c5c9fa126d36'
|
||||
build: 'eaf36990-6768-11e7-b615-6ddbba39daf4'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -157,6 +157,14 @@ var Group = new Class({
|
|||
|
||||
Actions.SetAlpha(entries, alpha, stepAlpha);
|
||||
|
||||
var hitArea = GetValue(options, 'hitArea', null);
|
||||
var hitAreaCallback = GetValue(options, 'hitAreaCallback', null);
|
||||
|
||||
if (hitArea)
|
||||
{
|
||||
Actions.SetHitArea(entries, hitArea, hitAreaCallback);
|
||||
}
|
||||
|
||||
var grid = GetValue(options, 'gridAlign', false);
|
||||
|
||||
if (grid)
|
||||
|
|
Loading…
Add table
Reference in a new issue