mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 14:07:20 +00:00
9708ea28dc
* Removed hardcoded laser logic * Address feedback
18 lines
546 B
C++
18 lines
546 B
C++
#include "AgMonumentLaserServer.h"
|
|
#include "EntityManager.h"
|
|
|
|
void AgMonumentLaserServer::OnStartup(Entity* self) {
|
|
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
|
|
for (auto laser : lasers) {
|
|
if (laser) laser->SetBoolean(u"active", true);
|
|
}
|
|
}
|
|
|
|
void AgMonumentLaserServer::OnDie(Entity* self, Entity* killer) {
|
|
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
|
|
for (auto laser : lasers) {
|
|
if (laser) laser->SetBoolean(u"active", false);
|
|
}
|
|
}
|
|
|