INNER CODE UNIT · Go
TestGetComponents
yohamta0/donburi-ecs · entry_test.go:28
func TestGetComponents(t *testing.T) {
var (
transform = donburi.NewComponentType[transformData]()
velocity = donburi.NewComponentType[velocityData]()
tag = donburi.NewTag().SetName("tag")
)
world := donburi.NewWorld()
a := world.Create(transform, velocity, tag)
entryA := world.Entry(a)
trData := transformData{
Position: vec2f{10, 20},
}
veData := velocityData{
Velocity: vec2f{30, 40},
}