Updated metaprogram to support variant types

This commit is contained in:
2024-12-21 00:54:47 +01:00
parent 07dbdcfe2c
commit 288df50558
3 changed files with 45 additions and 9 deletions

View File

@@ -53,7 +53,7 @@ Renderable :: struct {
MAX_CHILDREN :: 16;
Entity :: struct {
id: Entity_Id;
id: Entity_Id; @Hide
type : Type;
enabled: bool = true;

View File

@@ -263,7 +263,7 @@ update_entity_transform :: (e: *Entity, parent_matrix: Matrix4 = Matrix4_Identit
}
}
get_entity_with_id :: (scene: *Scene, id: s64) -> *Entity {
get_entity_by_id :: (scene: *Scene, id: s64) -> *Entity {
for scene.entities {
if it.id == id return it;
}