30 lines
689 B
Go
30 lines
689 B
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"edgaru089.ml/go/gl01/internal/entity"
|
|
"edgaru089.ml/go/gl01/internal/util/itype"
|
|
"edgaru089.ml/go/gl01/internal/world"
|
|
)
|
|
|
|
type PlayerBehaviour struct{}
|
|
|
|
func init() {
|
|
entity.RegisterEntityBehaviour(PlayerBehaviour{})
|
|
}
|
|
|
|
func (PlayerBehaviour) Name() string { return "player" }
|
|
|
|
func (PlayerBehaviour) Hitbox(pos itype.Vec3d, dataset itype.Dataset) itype.Vec3d {
|
|
return itype.Vec3d{0.6, 1.8, 0.6}
|
|
}
|
|
|
|
func (PlayerBehaviour) EyeHeight(pos itype.Vec3d, dataset itype.Dataset) float64 {
|
|
return 1.65
|
|
}
|
|
|
|
func (PlayerBehaviour) Update(pos itype.Vec3d, dataset itype.Dataset, world *world.World, deltaTime time.Duration) {
|
|
|
|
}
|