Changed out Timer for CallBackTimer

This commit is contained in:
EmosewaMC
2022-01-20 16:00:45 -08:00
parent e11260a2fe
commit 20789bab7f
2 changed files with 3 additions and 14 deletions

View File

@@ -8,12 +8,8 @@ void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
if (skillComponent == nullptr) return;
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
self->AddTimer("DestroyAfter10Seconds", 10.0f);
}
void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "DestroyAfter10Seconds") {
self->AddCallbackTimer(10.0f, [self]() {
self->Smash();
}
}
});
}