Mercurial > games > semicongine
diff src/semicongine/entity.nim @ 142:9c0d7839dc91
add: correct mesh buffer data updates to GPU
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 25 Apr 2023 18:23:57 +0700 |
parents | 9901ec3831d1 |
children | df92519d4d68 |
line wrap: on
line diff
--- a/src/semicongine/entity.nim Sat Apr 22 17:34:59 2023 +0700 +++ b/src/semicongine/entity.nim Tue Apr 25 18:23:57 2023 +0700 @@ -31,6 +31,9 @@ func hash*(entity: Entity): Hash = hash(cast[pointer](entity)) +func hash*(component: Component): Hash = + hash(cast[pointer](component)) + method `$`*(entity: Entity): string {.base.} = entity.name method `$`*(component: Component): string {.base.} = "Unknown Component"