|
Rebel Fork Framework
|
Spriter instance. More...
#include <Urho3D/Urho2D/SpriterInstance2D.h>
Public Member Functions | |
| SpriterInstance (Component *owner, Spriter::SpriterData *spriteData) | |
| Constructor with spriter data. | |
| ~SpriterInstance () | |
| Destructor. | |
| bool | SetEntity (int index) |
| Set current entity. | |
| bool | SetEntity (const ea::string &entityName) |
| Set current entity. | |
| bool | SetAnimation (int index, LoopMode loopMode=Default) |
| Set current animation. | |
| bool | SetAnimation (const ea::string &animationName, LoopMode loopMode=Default) |
| Set current animation. | |
| void | setSpatialInfo (const Spriter::SpatialInfo &spatialInfo) |
| Set root spatial info. | |
| void | setSpatialInfo (float x, float y, float angle, float scaleX, float scaleY) |
| Set root spatial info. | |
| void | Update (float deltaTime) |
| Update animation. | |
| Spriter::Entity * | GetEntity () const |
| Return current entity. | |
| Spriter::Animation * | GetAnimation () const |
| Return current animation. | |
| const Spriter::SpatialInfo & | GetSpatialInfo () const |
| Return root spatial info. | |
| const ea::vector< Spriter::SpatialTimelineKey * > & | GetTimelineKeys () const |
| Return animation result timeline keys. | |
Private Member Functions | |
| void | OnSetEntity (Entity *entity) |
| Handle set entity. | |
| void | OnSetAnimation (Animation *animation, LoopMode loopMode=Default) |
| Handle set animation. | |
| void | UpdateMainlineKey () |
| Update mainline key. | |
| void | UpdateTimelineKeys () |
| Update timeline keys. | |
| TimelineKey * | GetTimelineKey (Ref *ref) const |
| Get timeline key by ref. | |
| void | Clear () |
| Clear mainline key and timeline keys. | |
Private Attributes | |
| Component * | owner_ {} |
| Parent component. | |
| SpriterData * | spriterData_ {} |
| Spriter data. | |
| Entity * | entity_ {} |
| Current entity. | |
| Animation * | animation_ {} |
| Current animation. | |
| bool | looping_ {} |
| Looping. | |
| SpatialInfo | spatialInfo_ |
| Root spatial info. | |
| float | currentTime_ {} |
| Current time. | |
| MainlineKey * | mainlineKey_ {} |
| Current mainline key. | |
| ea::vector< SpatialTimelineKey * > | timelineKeys_ |
| Current timeline keys. | |
Spriter instance.