mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Add Animation Table logic
This commit is contained in:
@@ -73,7 +73,7 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
float animationTime = RenderComponent::PlayAnimation(self, u"stunstart", 1.7f);
|
||||
|
||||
self->AddTimer("timeToStunLoop", animationTime);
|
||||
self->AddTimer("timeToStunLoop", 1.0f);
|
||||
|
||||
auto position = self->GetPosition();
|
||||
auto forward = self->GetRotation().GetForwardVector();
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -28,9 +28,8 @@ void NtParadoxTeleServer::OnProximityUpdate(Entity* self, Entity* entering, std:
|
||||
true, true, true, true, true, true, true
|
||||
);
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"teledeath", 4.0f);
|
||||
|
||||
const auto animTime = 2;
|
||||
auto animTime = RenderComponent::PlayAnimation(player, u"teledeath", 4.0f);
|
||||
if (animTime == 0.0f) animTime = 2.0f;
|
||||
|
||||
self->AddCallbackTimer(animTime, [this, self, playerID]() {
|
||||
auto* player = EntityManager::Instance()->GetEntity(playerID);
|
||||
|
Reference in New Issue
Block a user