19 lines
300 B
Go
19 lines
300 B
Go
//go:build example
|
|
// +build example
|
|
|
|
package component
|
|
|
|
import (
|
|
"code.rocketnine.space/tslocum/gohan"
|
|
)
|
|
|
|
type VelocityComponent struct {
|
|
X, Y float64
|
|
}
|
|
|
|
var VelocityComponentID = gohan.NextComponentID()
|
|
|
|
func (c *VelocityComponent) ComponentID() gohan.ComponentID {
|
|
return VelocityComponentID
|
|
}
|