mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Added step value to Rotate Action.
This commit is contained in:
parent
b464aa5c8f
commit
5c0f550072
3 changed files with 8 additions and 6 deletions
|
@ -1,8 +1,10 @@
|
|||
var Rotate = function (items, value)
|
||||
var Rotate = function (items, value, step)
|
||||
{
|
||||
if (step === undefined) { step = 0; }
|
||||
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
items[i].rotation += value;
|
||||
items[i].rotation += value + (i * step);
|
||||
}
|
||||
|
||||
return items;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '5d709120-1410-11e7-94c7-b1edf9b04222'
|
||||
build: '262e7d70-1411-11e7-8d7e-9ffab0018bd6'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -152,7 +152,7 @@ var Layer = new Class({
|
|||
Actions.SetRotation(entries, rotation, stepRotation);
|
||||
|
||||
var scaleX = GetObjectValue(options, 'setScale.x', 1);
|
||||
var scaleY = GetObjectValue(options, 'setScale.y', 1);
|
||||
var scaleY = GetObjectValue(options, 'setScale.y', scaleX);
|
||||
var stepScaleX = GetObjectValue(options, 'setScale.stepX', 0);
|
||||
var stepScaleY = GetObjectValue(options, 'setScale.stepY', 0);
|
||||
|
||||
|
@ -267,9 +267,9 @@ var Layer = new Class({
|
|||
return this;
|
||||
},
|
||||
|
||||
rotate: function (value)
|
||||
rotate: function (value, step)
|
||||
{
|
||||
Actions.Rotate(this.children.entries, value);
|
||||
Actions.Rotate(this.children.entries, value, step);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue