mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Sprite now uses BuildAnimation function.
This commit is contained in:
parent
e96dabf0cd
commit
1abf6e7b1e
1 changed files with 3 additions and 26 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue