phaser/v3/src/tween/Timeline.js

42 lines
785 B
JavaScript
Raw Normal View History

2017-05-18 05:40:51 +00:00
var TweenBuilder = require('./TweenBuilder');
2017-05-18 03:02:07 +00:00
var Timeline = function (manager)
{
this.manager = manager;
this.tweens = [];
this.paused = true;
this.callbacks = {
onStart: { callback: null, scope: null, params: null },
onUpdate: { callback: null, scope: null, params: null },
onRepeat: { callback: null, scope: null, params: null },
onComplete: { callback: null, scope: null, params: null }
};
this.callbackScope;
};
Timeline.prototype.constructor = Timeline;
Timeline.prototype = {
add: function (config)
{
TweenBuilder(this, config);
return this;
},
queue: function (tween)
{
// Add to this timeline
this.tweens.push(tween);
}
};
module.exports = Timeline;