Updated metaprogram to support variant types
This commit is contained in:
@@ -53,7 +53,7 @@ Renderable :: struct {
|
||||
MAX_CHILDREN :: 16;
|
||||
|
||||
Entity :: struct {
|
||||
id: Entity_Id;
|
||||
id: Entity_Id; @Hide
|
||||
type : Type;
|
||||
|
||||
enabled: bool = true;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user