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-07-15 20:56:33 +00:00
|
|
|
auto lasers = Game::entityManager->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
|
2023-05-13 23:21:17 +00:00
|
|
|
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) {
|
2023-07-15 20:56:33 +00:00
|
|
|
auto lasers = Game::entityManager->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
|
2023-05-13 23:21:17 +00:00
|
|
|
for (auto laser : lasers) {
|
|
|
|
if (laser) laser->SetBoolean(u"active", false);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|