mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Gizmo improvements
This commit is contained in:
@@ -12,6 +12,20 @@ namespace GlitchyEngine.World
|
||||
internal EcsWorld _ecsWorld = new .() ~ delete _;
|
||||
|
||||
private Dictionary<Type, function void(Entity entity, Type componentType, void* component)> _onComponentAddedHandlers = new .() ~ delete _;
|
||||
|
||||
public Entity ActiveCamera => {
|
||||
Entity cameraEntity = .();
|
||||
|
||||
for (var (entity, camera) in _ecsWorld.Enumerate<CameraComponent>())
|
||||
{
|
||||
if (camera.Primary && camera.RenderTarget != null)
|
||||
{
|
||||
cameraEntity = .(entity, this);
|
||||
}
|
||||
}
|
||||
|
||||
cameraEntity
|
||||
};
|
||||
|
||||
public this()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user