mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-24 06:23:35 +00:00
16 lines
537 B
C++
16 lines
537 B
C++
|
#include "FvRacePillarServer.h"
|
||
|
|
||
|
#include "Game.h"
|
||
|
#include "EntityManager.h"
|
||
|
#include "RenderComponent.h"
|
||
|
|
||
|
void FvRacePillarServer::PlayAnimation(const std::string animName, const std::string group, const LOT lot) {
|
||
|
const auto entities = Game::entityManager->GetEntitiesInGroup(group);
|
||
|
for (const auto& entity : entities) {
|
||
|
if (!entity || entity->GetLOT() != lot) continue;
|
||
|
auto* renderComponent = entity->GetComponent<RenderComponent>();
|
||
|
if (!renderComponent) continue;
|
||
|
renderComponent->PlayAnimation(entity, animName);
|
||
|
}
|
||
|
}
|