mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-14 03:50:05 +00:00
26 lines
449 B
Go
26 lines
449 B
Go
package entity
|
|
|
|
import "github.com/CPunch/gopenfusion/core/protocol"
|
|
|
|
type EntityKind int
|
|
|
|
const (
|
|
ENTITY_KIND_PLAYER EntityKind = iota
|
|
ENTITY_KIND_NPC
|
|
)
|
|
|
|
type Entity interface {
|
|
GetKind() EntityKind
|
|
|
|
GetChunk() ChunkPosition
|
|
GetPosition() (x int, y int, z int)
|
|
GetAngle() int
|
|
|
|
SetChunk(chunk ChunkPosition)
|
|
SetPosition(x, y, z int)
|
|
SetAngle(angle int)
|
|
|
|
DisappearFromViewOf(peer *protocol.CNPeer)
|
|
EnterIntoViewOf(peer *protocol.CNPeer)
|
|
}
|