phaser/v3/src/tween/builder/GetTweens.js
2017-09-07 15:40:38 +01:00

24 lines
413 B
JavaScript

var GetValue = require('../../utils/object/GetValue');
var GetTweens = function (config)
{
var tweens = GetValue(config, 'tweens', null);
if (tweens === null)
{
return [];
}
else if (typeof tweens === 'function')
{
tweens = tweens.call();
}
if (!Array.isArray(tweens))
{
tweens = [ tweens ];
}
return tweens;
};
module.exports = GetTweens;