diff options
Diffstat (limited to 'ecs')
| -rw-r--r-- | ecs/component.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ecs/component.go b/ecs/component.go new file mode 100644 index 0000000..29ef967 --- /dev/null +++ b/ecs/component.go @@ -0,0 +1,10 @@ +package ecs + +type Component[T any] struct { + IsEnabled bool + Value T +} + +func C[T any](t T) Component[T] { + return Component[T]{IsEnabled: true, Value: t} +} |
