mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-21 23:10:06 +00:00
26 lines
434 B
Go
26 lines
434 B
Go
package entity
|
|
|
|
import "github.com/CPunch/gopenfusion/cnet"
|
|
|
|
type EntityKind int
|
|
|
|
const (
|
|
ENTITY_KIND_PLAYER EntityKind = iota
|
|
ENTITY_KIND_NPC
|
|
)
|
|
|
|
type Entity interface {
|
|
GetKind() EntityKind
|
|
|
|
GetChunkPos() ChunkPosition
|
|
GetPosition() (x int, y int, z int)
|
|
GetAngle() int
|
|
|
|
SetChunkPos(chunk ChunkPosition)
|
|
SetPosition(x, y, z int)
|
|
SetAngle(angle int)
|
|
|
|
DisappearFromViewOf(peer *cnet.Peer)
|
|
EnterIntoViewOf(peer *cnet.Peer)
|
|
}
|