Add ComponentType.Get(World, *donburi.Entry) Method
yohamta opened this issue · comments
Yota Hamada commented
Add Generics method and eliminate the need for making tons of helper functions like this. Also, it will be Type-safe!
func GetVelocity(entry *donburi.Entry) *VelocityData {
return donburi.Get[VelocityData](entry, Velocity)
}
- Add
(c *ComponentType[T]) ComponentType.Get(World, *donburi.Entry) *T
- Add
(c *ComponentType[T]) ComponentType.Set(World, *donburi.Entry, *T)
- Add
(c *ComponentType[T]) ComponentType.SetValue(World, *donburi.Entry, T)
- Update README.md
Yota Hamada commented
Done in v1.3.0