Animation controller uses now the singleton pattern

This commit is contained in:
devZoGok
2022-03-01 20:51:40 +02:00
parent 78f43e11bd
commit f64a3e13df
19 changed files with 46 additions and 44 deletions
+1 -4
View File
@@ -8,15 +8,13 @@
namespace vb01{
class Animation;
class AnimationController;
class Skeleton{
public:
Skeleton(AnimationController*, std::string = "");
Skeleton(std::string = "");
void update();
void addBone(Bone*, Bone*);
Bone* getBone(std::string);
inline AnimationController* getAnimationController(){return controller;}
inline Bone* getBone(int i){return bones[i];}
inline Bone* getRootBone(){return bones[0];}
inline std::vector<Bone*>& getBones(){return bones;}
@@ -30,7 +28,6 @@ namespace vb01{
std::string name;
std::vector<Bone*> bones;
AnimationController *controller = nullptr;
};
}