diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-04 17:55:53 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-04 23:02:21 +0200 |
| commit | a5fef758107888853c14a592696b45768ef56df8 (patch) | |
| tree | 9d1fd0b0abb49ce6814b8868926bf7af83611303 /ecs/component.go | |
| parent | e3f14fc0b375b4b7c2204a669d058ac124b78e92 (diff) | |
Refactor into packages
Diffstat (limited to 'ecs/component.go')
| -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} +} |
