refactoring

This commit is contained in:
Nick Fisher
2025-03-19 17:54:43 +08:00
parent 124f923720
commit 6744c02019
23 changed files with 1074 additions and 1278 deletions

View File

@@ -227,23 +227,7 @@ namespace thermion
scene->remove(_gridEntity);
// scene->remove(_sphereEntity);
}
void GridOverlay::setPriority(RenderableManager &rm, int priority)
{
auto gridInstance = rm.getInstance(_gridEntity);
rm.setPriority(gridInstance, priority);
// auto sphereInstance = rm.getInstance(_sphereEntity);
// rm.setPriority(sphereInstance, priority);
}
void GridOverlay::setLayer(RenderableManager &rm, int layer)
{
auto gridInstance = rm.getInstance(_gridEntity);
rm.setLayerMask(gridInstance, 0xFF, 1u << (uint8_t)layer);
// auto sphereInstance = rm.getInstance(_sphereEntity);
// rm.setLayerMask(sphereInstance, 0xFF, 1u << (uint8_t)layer);
}
SceneAsset *GridOverlay::getInstanceByEntity(utils::Entity entity)
{
for (auto &instance : _instances)