Skip to content

Commit 1abf6e7

Browse files
committed
Sprite now uses BuildAnimation function.
1 parent e96dabf commit 1abf6e7

1 file changed

Lines changed: 4 additions & 27 deletions

File tree

v3/src/gameobjects/sprite/BuildFromConfig.js

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var Sprite = require('./Sprite');
22
var GetAdvancedValue = require('../../utils/object/GetAdvancedValue');
33
var BuildGameObject = require('../BuildGameObject');
4+
var BuildGameObjectAnimation = require('../BuildGameObjectAnimation');
45

56
var BuildFromConfig = function (state, config)
67
{
@@ -13,33 +14,9 @@ var BuildFromConfig = function (state, config)
1314

1415
// Sprite specific config options:
1516

16-
// { anims: 'key' }
17-
// { anims: {
18-
// key: string
19-
// startFrame: [string|integer]
20-
// }
21-
// }
22-
23-
// delay: Components.Delay,
24-
// delayedPlay: Components.DelayedPlay,
25-
// load: Components.Load,
26-
// pause: Components.Pause,
27-
// paused: Components.Paused,
28-
// play: Components.Play,
29-
// progress: Components.Progress,
30-
// repeat: Components.Repeat,
31-
// repeatDelay: Components.RepeatDelay,
32-
// restart: Components.Restart,
33-
// resume: Components.Resume,
34-
// stop: Components.Stop,
35-
// timeScale: Components.TimeScale,
36-
// totalFrames: Components.TotalFrames,
37-
// totalProgress: Components.TotalProgress,
38-
// update: Components.Update,
39-
// updateFrame: Components.UpdateFrame,
40-
// yoyo: Components.Yoyo
41-
42-
// var anim = GetAdvancedValue(config, 'anims', null);
17+
BuildGameObjectAnimation(sprite, config);
18+
19+
// Physics, Input, etc to follow ...
4320

4421
return sprite;
4522
};

0 commit comments

Comments
 (0)