2021-12-05 17:54:36 +00:00
|
|
|
#include "AgMonumentLaserServer.h"
|
2023-05-13 23:21:17 +00:00
|
|
|
#include "EntityManager.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
void AgMonumentLaserServer::OnStartup(Entity* self) {
|
2023-05-13 23:21:17 +00:00
|
|
|
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
|
|
|
|
for (auto laser : lasers) {
|
|
|
|
if (laser) laser->SetBoolean(u"active", true);
|
|
|
|
}
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
2023-05-13 23:21:17 +00:00
|
|
|
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);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|