-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathAnimationGroup.h
More file actions
33 lines (24 loc) · 795 Bytes
/
AnimationGroup.h
File metadata and controls
33 lines (24 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CLASS_ANIMATIONGROUP
#define CLASS_ANIMATIONGROUP
#include <nctl/Array.h>
#include "IAnimation.h"
#include "LoopComponent.h"
/// The animation group abstract class
class AnimationGroup : public IAnimation
{
public:
AnimationGroup();
inline nctl::Array<nctl::UniquePtr<IAnimation>> &anims() { return anims_; }
inline const nctl::Array<nctl::UniquePtr<IAnimation>> &anims() const { return anims_; }
inline const LoopComponent &loop() const { return loop_; }
inline LoopComponent &loop() { return loop_; }
void stop() override;
protected:
LoopComponent loop_;
nctl::Array<nctl::UniquePtr<IAnimation>> anims_;
void cloneTo(AnimationGroup &other) const;
void stopAnimations();
bool shouldReverseAnimDirection();
void reverseAnimDirection(IAnimation &anim);
};
#endif