18 std::string animationName =
"";
19 timestamp resumeTime = 0;
42 void update(
float deltaTime)
override
44 if (animationName ==
"Default") {
47 if (
rectangle->flash_animation.hasFinished()) {
48 rectangle->flash_animation.finished =
false;
49 rectangle->flash_animation.times_played = 0;
53 rectangle->flash_animation.advanceFrame(deltaTime);
62 void Play(
const std::string& animName,
int reps = 0)
65 animationName = animName;
66 FlashAnimation& flash_animation = animManager.flash_animations[animationName];
68 flash_animation.indexX, flash_animation.indexY,
69 flash_animation.total_frames, flash_animation.speed,
71 flash_animation.getSpeedsAsVector(),
72 flash_animation.flashColor,
73 reps ? reps : flash_animation.reps
77 void resetAnimation() {
79 animationName =
"Default";
81 animManager.flash_animations[animationName].indexX, animManager.flash_animations[animationName].indexY,
82 animManager.flash_animations[animationName].total_frames, animManager.flash_animations[animationName].speed,
83 animManager.flash_animations[animationName].type,
84 animManager.flash_animations[animationName].getSpeedsAsVector(),
85 animManager.flash_animations[animationName].flashColor);
88 std::string getPlayName()
Rectangle_w_Color * rectangle
also we use MovingAnimator instead of simple Animator so that entities use less memory and we use it ...
Definition RectangleFlashAnimatorComponent.h:17