mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 02:04:04 +00:00
Add Animation Table logic
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user