mirror of
https://github.com/photonstorm/phaser
synced 2024-12-27 13:33:35 +00:00
24 lines
413 B
JavaScript
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;
|