Changed Animation and BoneAttachment "Name" field to "AnimationName" and "BoneName"

This commit is contained in:
viktorljung
2016-01-27 17:27:34 +01:00
parent 405002777c
commit 2ec5023752
9 changed files with 19 additions and 27 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ void AnimationSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& a
Skeleton* skeleton = model->m_RawModel->m_Skeleton;
const Skeleton::Animation* animation = skeleton->GetAnimation(animationComponent["Name"]);
const Skeleton::Animation* animation = skeleton->GetAnimation(animationComponent["AnimationName"]);
if(animation != nullptr) {
double animationSpeed = (double)animationComponent["Speed"];
@@ -29,7 +29,7 @@ void AnimationSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& a
(double&)animationComponent["Speed"] = 0.0;
Events::AnimationComplete e;
e.Entity = entity;
e.Name = (std::string)animationComponent["Name"];
e.Name = (std::string)animationComponent["AnimationName"];
m_EventBroker->Publish(e);
} else {
if (glm::abs(nextTime) > animation->Duration) {