TazGraph Project v0.1.0
Loading...
Searching...
No Matches
AnimatorManager.h
1#pragma once
2
3#include <map>
4#include "Animation.h"
5#include "MovingAnimation.h"
6#include "FlashAnimation.h"
7
8
10{
11public:
12 std::map<std::string, Animation> animations;
13 std::map<std::string, MovingAnimation> moving_animations;
14 std::map<std::string, FlashAnimation> flash_animations;
15
17 {}
18
19 static AnimatorManager& getInstance() {
20 static AnimatorManager instance;
21 return instance;
22 }
23
24 void InitializeAnimators()
25 {
26 Animation defaultAnimation = Animation(6, 2, 1, 0.04f, "looped");
27
28 animations.emplace("Default", defaultAnimation);
29
30 MovingAnimation defaultMoveAnimation = MovingAnimation(0, 0, 0, 0.0, "looped", 0, 0);
31
32 moving_animations.emplace("Default", defaultMoveAnimation);
33
34 FlashAnimation defaultFlashAnimation = FlashAnimation(0, 0, 3, 0.0f, "looped", { 0.2f, 1.0f, 0.2f, 1.0f }, { 255,255,255,255 });
35 FlashAnimation lineTransferFlashAnimation = FlashAnimation(0, 0, 3, 0.01f, "play_n_times", { 0.01f, 0.01f, 0.00f, 0.01f }, { 255,255,255,255 }, 1);
36 FlashAnimation rectangleInterpolationFlashAnimation = FlashAnimation(0, 0, 3, 0.01f, "back_forth", { 0.01f, 0.01f, 1.00f, 0.01f }, { 255,0,0,255 }, 0);
37
38 flash_animations.emplace("Default", defaultFlashAnimation);
39 flash_animations.emplace("LineTransfer", lineTransferFlashAnimation);
40 flash_animations.emplace("RectInterpolation", rectangleInterpolationFlashAnimation);
41
42
43 }
44};
Definition MovingAnimation.h:9
Definition Animation.h:6
Definition AnimatorManager.h:10
Definition FlashAnimation.h:10