new server
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m19s

This commit is contained in:
Smile Rex
2026-01-17 16:38:45 +03:00
parent 1c60264d1d
commit 3c989c33f8
10 changed files with 156 additions and 85 deletions

View File

@@ -8,12 +8,44 @@ const (
EntityBullet EntityType = 3
)
type Entity struct {
ID uint32
Type EntityType
X float32
Y float32
Z float32
Yaw float32
type Entity interface {
GetID() uint32
GetType() EntityType
GetPosition() (float32, float32, float32)
SetPosition(float32, float32, float32)
GetYaw() float32
SetYaw(float32)
}
type BaseEntity struct {
ID uint32
Type EntityType
X, Y, Z float32
Yaw float32
}
func (e *BaseEntity) GetID() uint32 {
return e.ID
}
func (e *BaseEntity) GetType() EntityType {
return e.Type
}
func (e *BaseEntity) GetPosition() (float32, float32, float32) {
return e.X, e.Y, e.Z
}
func (e *BaseEntity) SetPosition(x, y, z float32) {
e.X = x
e.Y = y
e.Z = z
}
func (e *BaseEntity) GetYaw() float32 {
return e.Yaw
}
func (e *BaseEntity) SetYaw(yaw float32) {
e.Yaw = yaw
}