minor chunk refactoring

- rename GetChunk -> GetChunkPos
- rename SetChunk -> SetChunkPos
This commit is contained in:
2023-11-21 01:36:23 -06:00
parent 3e04103ae4
commit 06f4a4d33f
5 changed files with 16 additions and 16 deletions

View File

@@ -12,11 +12,11 @@ const (
type Entity interface {
GetKind() EntityKind
GetChunk() ChunkPosition
GetChunkPos() ChunkPosition
GetPosition() (x int, y int, z int)
GetAngle() int
SetChunk(chunk ChunkPosition)
SetChunkPos(chunk ChunkPosition)
SetPosition(x, y, z int)
SetAngle(angle int)

View File

@@ -36,7 +36,7 @@ func (npc *NPC) GetKind() EntityKind {
return ENTITY_KIND_NPC
}
func (npc *NPC) GetChunk() ChunkPosition {
func (npc *NPC) GetChunkPos() ChunkPosition {
return npc.Chunk
}
@@ -48,7 +48,7 @@ func (npc *NPC) GetAngle() int {
return npc.Angle
}
func (npc *NPC) SetChunk(chunk ChunkPosition) {
func (npc *NPC) SetChunkPos(chunk ChunkPosition) {
npc.Chunk = chunk
}

View File

@@ -44,7 +44,7 @@ func (plr *Player) GetKind() EntityKind {
return ENTITY_KIND_PLAYER
}
func (plr *Player) GetChunk() ChunkPosition {
func (plr *Player) GetChunkPos() ChunkPosition {
return plr.Chunk
}
@@ -56,7 +56,7 @@ func (plr *Player) GetAngle() int {
return plr.Angle
}
func (plr *Player) SetChunk(chunk ChunkPosition) {
func (plr *Player) SetChunkPos(chunk ChunkPosition) {
plr.Chunk = chunk
}