-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathScriptAnimation.h
More file actions
34 lines (23 loc) · 708 Bytes
/
ScriptAnimation.h
File metadata and controls
34 lines (23 loc) · 708 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
34
#ifndef CLASS_SCRIPTANIMATION
#define CLASS_SCRIPTANIMATION
#include "SpriteAnimation.h"
class Script;
/// The script animation class
class ScriptAnimation : public SpriteAnimation
{
public:
ScriptAnimation();
ScriptAnimation(Sprite *sprite, Script *script);
nctl::UniquePtr<IAnimation> clone() const override;
inline Type type() const override { return Type::SCRIPT; }
void play() override;
void perform() override;
void setSprite(Sprite *sprite) override;
inline const Script *script() const { return script_; }
inline Script *script() { return script_; }
void setScript(Script *script);
private:
Script *script_;
bool runScript(const char *functionName, float value);
};
#endif