readable .vb format

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent a13d4f1244
commit 3753d08ca5
27 changed files with 783 additions and 274 deletions
+31 -1
View File
@@ -1,5 +1,35 @@
#include"skeleton.h"
#include"animation.h"
using namespace std;
namespace vb01{
Skeleton::Skeleton(){}
Skeleton::Skeleton(string name){
this->name=name;
}
void Skeleton::addBone(Bone *bone, Node *parent){
parent->attachChild(bone);
bones.push_back(bone);
}
Bone* Skeleton::getBone(string name){
Bone *bone=nullptr;
for(Bone *b : bones)
if(b->getName()==name){
bone=b;
break;
}
return bone;
}
Animation* Skeleton::getAnimation(string name){
Animation *anim=nullptr;
for(Animation *a : animations)
if(a->getName()==name){
anim=a;
break;
}
return anim;
}
}