mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Changed out Timer for CallBackTimer
This commit is contained in:
parent
e11260a2fe
commit
20789bab7f
@ -9,11 +9,7 @@ void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) {
|
|||||||
|
|
||||||
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
|
skillComponent->CalculateBehavior(201, 1784, self->GetObjectID());
|
||||||
|
|
||||||
self->AddTimer("DestroyAfter10Seconds", 10.0f);
|
self->AddCallbackTimer(10.0f, [self]() {
|
||||||
}
|
|
||||||
|
|
||||||
void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
|
|
||||||
if (timerName == "DestroyAfter10Seconds") {
|
|
||||||
self->Smash();
|
self->Smash();
|
||||||
}
|
});
|
||||||
}
|
}
|
@ -11,13 +11,6 @@ public:
|
|||||||
* @param target The target of the self that called this script.
|
* @param target The target of the self that called this script.
|
||||||
*/
|
*/
|
||||||
void OnRebuildComplete(Entity* self, Entity* target) override;
|
void OnRebuildComplete(Entity* self, Entity* target) override;
|
||||||
/**
|
|
||||||
* @brief When 10 seconds have passed, smash self.
|
|
||||||
*
|
|
||||||
* @param self The Entity whos timer has done.
|
|
||||||
* @param timerName The name of the done timer
|
|
||||||
*/
|
|
||||||
void OnTimerDone(Entity* self, std::string timerName) override;
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Skill ID for the buff station.
|
* Skill ID for the buff station.
|
||||||
|
Loading…
Reference in New Issue
Block a user