Sprite now uses BuildAnimation function.

This commit is contained in:
Richard Davey 2017-04-11 03:13:51 +01:00
parent e96dabf0cd
commit 1abf6e7b1e

View file

@ -1,6 +1,7 @@
var Sprite = require('./Sprite'); var Sprite = require('./Sprite');
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue'); var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
var BuildGameObject = require('../BuildGameObject'); var BuildGameObject = require('../BuildGameObject');
var BuildGameObjectAnimation = require('../BuildGameObjectAnimation');
var BuildFromConfig = function (state, config) var BuildFromConfig = function (state, config)
{ {
@ -13,33 +14,9 @@ var BuildFromConfig = function (state, config)
// Sprite specific config options: // Sprite specific config options:
// { anims: 'key' } BuildGameObjectAnimation(sprite, config);
// { anims: {
// key: string
// startFrame: [string|integer]
// }
// }
// delay: Components.Delay, // Physics, Input, etc to follow ...
// delayedPlay: Components.DelayedPlay,
// load: Components.Load,
// pause: Components.Pause,
// paused: Components.Paused,
// play: Components.Play,
// progress: Components.Progress,
// repeat: Components.Repeat,
// repeatDelay: Components.RepeatDelay,
// restart: Components.Restart,
// resume: Components.Resume,
// stop: Components.Stop,
// timeScale: Components.TimeScale,
// totalFrames: Components.TotalFrames,
// totalProgress: Components.TotalProgress,
// update: Components.Update,
// updateFrame: Components.UpdateFrame,
// yoyo: Components.Yoyo
// var anim = GetAdvancedValue(config, 'anims', null);
return sprite; return sprite;
}; };