2023-06-25 06:51:21 +00:00
|
|
|
package entity
|
|
|
|
|
2023-12-01 21:29:19 +00:00
|
|
|
import "github.com/CPunch/gopenfusion/cnpeer"
|
2023-06-25 08:33:17 +00:00
|
|
|
|
2023-06-25 06:51:21 +00:00
|
|
|
type EntityKind int
|
|
|
|
|
|
|
|
const (
|
|
|
|
ENTITY_KIND_PLAYER EntityKind = iota
|
|
|
|
ENTITY_KIND_NPC
|
|
|
|
)
|
|
|
|
|
|
|
|
type Entity interface {
|
|
|
|
GetKind() EntityKind
|
|
|
|
|
2023-11-21 07:36:23 +00:00
|
|
|
GetChunkPos() ChunkPosition
|
2023-06-25 06:51:21 +00:00
|
|
|
GetPosition() (x int, y int, z int)
|
|
|
|
GetAngle() int
|
|
|
|
|
2023-11-21 07:36:23 +00:00
|
|
|
SetChunkPos(chunk ChunkPosition)
|
2023-06-25 06:51:21 +00:00
|
|
|
SetPosition(x, y, z int)
|
|
|
|
SetAngle(angle int)
|
2023-06-25 08:33:17 +00:00
|
|
|
|
2023-12-01 21:29:19 +00:00
|
|
|
DisappearFromViewOf(peer *cnpeer.CNPeer)
|
|
|
|
EnterIntoViewOf(peer *cnpeer.CNPeer)
|
2023-06-25 06:51:21 +00:00
|
|
|
}
|