Now have the ability to specify parameters needed.
This commit is contained in:
parent
949bbd4f15
commit
c4fcb41c34
3 changed files with 98 additions and 66 deletions
|
|
@ -115,15 +115,17 @@ namespace components {
|
|||
};
|
||||
|
||||
struct Animation {
|
||||
float scale_x = 1.0f;
|
||||
float scale_y = 1.0f;
|
||||
float max_scale = 1.0f;
|
||||
float min_x = 1.0f;
|
||||
float min_y = 1.0f;
|
||||
float max_x = 1.0f;
|
||||
float max_y = 1.0f;
|
||||
bool simple = true;
|
||||
int frames = 10;
|
||||
int frames = 1;
|
||||
float speed = 0.3f;
|
||||
ease::Style easing = ease::IN_OUT_BACK;
|
||||
ease::Motion motion = ease::RUSH;
|
||||
float ease_rate = 0.5f;
|
||||
bool scaled = false;
|
||||
bool stationary = false;
|
||||
bool toggled = false;
|
||||
bool looped = false;
|
||||
|
|
@ -161,8 +163,8 @@ namespace components {
|
|||
ENROLL_COMPONENT(Motion, dx, dy, random);
|
||||
ENROLL_COMPONENT(Combat, hp, max_hp, damage, dead);
|
||||
ENROLL_COMPONENT(Device, config, events);
|
||||
ENROLL_COMPONENT(Animation, scale_x, scale_y, max_scale, simple, frames,
|
||||
speed, easing, motion, ease_rate, stationary, toggled, looped);
|
||||
ENROLL_COMPONENT(Animation, min_x, min_y, max_x, max_y, simple, frames,
|
||||
speed, easing, motion, ease_rate, scaled, stationary, toggled, looped);
|
||||
ENROLL_COMPONENT(Sound, attack, death);
|
||||
ENROLL_COMPONENT(Collision, has);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue