#include "GfApeSmashingQB.h" #include "EntityManager.h" #include "GameMessages.h" #include "Entity.h" #include "RenderComponent.h" void GfApeSmashingQB::OnStartup(Entity* self) { self->SetNetworkVar(u"lootTagOwner", self->GetVar(u"lootTagOwner")); } void GfApeSmashingQB::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "anchorBreakTime") { self->Smash(); } } void GfApeSmashingQB::OnRebuildComplete(Entity* self, Entity* target) { auto* ape = EntityManager::Instance()->GetEntity(self->GetVar(u"ape")); if (ape != nullptr) { ape->OnFireEventServerSide(target, "rebuildDone"); RenderComponent::PlayAnimation(self, u"smash", 1.7f); self->AddTimer("anchorBreakTime", 1.0f); } }