Files
a301_game_server/internal/entity/entity.go
2026-02-26 17:52:48 +09:00

27 lines
452 B
Go

package entity
import (
pb "a301_game_server/proto/gen/pb"
"a301_game_server/pkg/mathutil"
)
// Type identifies the kind of entity.
type Type int
const (
TypePlayer Type = iota
TypeMob
TypeNPC
)
// Entity is anything that exists in the game world.
type Entity interface {
EntityID() uint64
EntityType() Type
Position() mathutil.Vec3
SetPosition(pos mathutil.Vec3)
Rotation() float32
SetRotation(rot float32)
ToProto() *pb.EntityState
}