Add Animation Table logic

This commit is contained in:
David Markowitz
2023-03-26 03:09:04 -07:00
parent 1e4e1b914c
commit 426bc963fe
40 changed files with 419 additions and 291 deletions

View File

@@ -7,7 +7,10 @@
#include "RenderComponent.h"
void MaestromExtracticatorServer::OnStartup(Entity* self) {
self->AddTimer("PlayFail", RenderComponent::PlayAnimation(self, failAnim));
float animTime = RenderComponent::PlayAnimation(self, failAnim);
if (animTime == 0.0f) animTime = defaultTime;
self->AddTimer("PlayFail", animTime);
self->AddTimer("RemoveSample", destroyAfterNoSampleTime);
}

View File

@@ -13,5 +13,6 @@ public:
private:
const std::string failAnim = "idle_maelstrom";
const std::string collectAnim = "collect_maelstrom";
const float defaultTime = 4.0f;
const float destroyAfterNoSampleTime = 8.0f;
};