11 #include "KapEngine.hpp"
27 std::shared_ptr<NodeAnim> target;
28 std::vector<std::string> triggers;
34 std::shared_ptr<Animation> _anim;
35 std::vector<std::shared_ptr<LinkAnim>> links;
39 NodeAnim(std::shared_ptr<Animation> anim, std::string name) {
40 PROFILER_FUNC_START();
48 PROFILER_FUNC_START();
49 for (std::size_t i = 0; i < links.size(); i++) {
50 if (links.at(i).get()->mainExit) {
62 Animator(std::shared_ptr<GameObject> go);
75 void addAnim(std::shared_ptr<Animation> anim, std::string name);
84 void addLink(std::string animName, std::string outAnim, std::string trigger =
"");
93 void addLink(std::string animName, std::string outAnim, std::vector<std::string> triggers);
108 std::shared_ptr<NodeAnim>
getAnimNode(std::string name);
112 size_t _currAnim = 0;
113 std::shared_ptr<NodeAnim> _anim;
114 std::shared_ptr<NodeAnim> _firstAnim;
115 std::vector<std::shared_ptr<NodeAnim>> _anims;