mirror of
https://github.com/photonstorm/phaser
synced 2024-12-28 22:13:44 +00:00
21 lines
352 B
JavaScript
21 lines
352 B
JavaScript
|
var GetValue = require('../../utils/object/GetValue');
|
||
|
|
||
|
var GetTweens = function (config)
|
||
|
{
|
||
|
var tweens = GetValue(config, 'tweens', null);
|
||
|
|
||
|
if (typeof tweens === 'function')
|
||
|
{
|
||
|
tweens = tweens.call();
|
||
|
}
|
||
|
|
||
|
if (!Array.isArray(tweens))
|
||
|
{
|
||
|
tweens = [ tweens ];
|
||
|
}
|
||
|
|
||
|
return tweens;
|
||
|
};
|
||
|
|
||
|
module.exports = GetTweens;
|