aboutsummaryrefslogtreecommitdiff
path: root/ecs/component.go
blob: 29ef96704f7daf4a46c90bd83bec56d0c428ef19 (plain) (blame)
1
2
3
4
5
6
7
8
9
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}
}