first commit

This commit is contained in:
2026-02-26 17:52:48 +09:00
commit dabf1f3ba9
49 changed files with 14883 additions and 0 deletions

26
internal/entity/entity.go Normal file
View File

@@ -0,0 +1,26 @@
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
}