1 #ifndef JUGIMAP_FRAME_ANIMATION_H
2 #define JUGIMAP_FRAME_ANIMATION_H
5 #include "jmAnimationCommon.h"
16 class JugiMapBinaryLoader;
30 std::vector<AnimationFrame*>&GetFrames(){
return frames; }
42 std::vector<AnimationFrame*>frames;
60 friend class EFrameAnimationPlayer;
102 int Update(
int msTimePoint,
int _flags)
override;
104 void ResetAnimatedProperties()
override;
105 void OnPlayingStart()
override;
106 void OnPlayingStop()
override;
112 std::vector<Sprite*>*sprites =
nullptr;
114 AnimatedProperties ap;
116 int startingFrameIndex = 0;
117 int activeFrameIndex = 0;
122 void Update(AnimationFrame *_animationFrame);
Sprite * GetSprite()
Returns the assigned sprite; if a vector of sprites has been assigned it returns nullptr!
Definition: jmFrameAnimation.h:81
std::vector< Sprite * > * GetSprites()
Returns a pointer to the vector of assigned sprites; if one sprite has been assigned it returns nullp...
Definition: jmFrameAnimation.h:87
void UpdateAnimatedSprites(bool _resetSpriteAnimatedProperties) override
Update the animated sprites.
Definition: jmFrameAnimation.cpp:293
int GetStartingFrameIndex()
Returns the starting index in the sequence of frames of this animation.
Definition: jmFrameAnimation.h:91
The base animation instance class.
Definition: jmAnimationCommon.h:163
The Sprite is the base sprite class.
Definition: jmSprites.h:32
The FrameAnimation class represents the sprite frame animation from JugiMap Editor.
Definition: jmFrameAnimation.h:24
int Update(int msTimePoint, int _flags) override
Update the animation state for the given msTimePoint.
Definition: jmFrameAnimation.cpp:208
AnimatedProperties & GetAnimatedProperties()
Get a reference to the AnimatedProperties object of this animation instance.
Definition: jmFrameAnimation.h:99
void SetStartingFrameIndex(int _startingFrameIndex)
Set the starting index in the sequence of frames of this animation to the given *_startingFrameIndex*...
Definition: jmFrameAnimation.cpp:163
The base animation class.
Definition: jmAnimationCommon.h:95
FrameAnimationInstance(FrameAnimation *_animation, Sprite *_sprite)
Constructor.
Definition: jmFrameAnimation.cpp:125
~FrameAnimationInstance() override
Destructor.
Definition: jmFrameAnimation.cpp:154
A class for using frame animations in animation players.
Definition: jmFrameAnimation.h:57
The SourceSprite class defines the source sprite from JugiMap Editor.
Definition: jmSourceGraphics.h:221
The JugiMapBinaryLoader class loads data from jugimap binary files (.jmb).
Definition: jmMapBinaryLoader.h:37