Files
vb01/animationController.h
T
2021-10-19 19:06:41 +03:00

31 lines
739 B
C++

#ifndef ANIMATION_CONTROLLER_H
#define ANIMATION_CONTROLLER_H
#include <string>
#include <vector>
#include "animation.h"
namespace vb01{
class Skeleton;
class AnimationChannel;
class AnimationController{
public:
AnimationController(Skeleton*);
~AnimationController();
void update();
Animation* getAnimation(std::string);
inline void addAnimation(Animation *anim){animations.push_back(anim);}
inline void addAnimationChannel(AnimationChannel *channel){channels.push_back(channel);}
private:
Skeleton *skeleton = nullptr;
std::vector<Animation*> animations;
std::vector<AnimationChannel*> channels;
protected:
void onAnimationEnd(std::string){}
void onAnimationStart(std::string){}
};
}
#endif