mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-11-14 03:20:04 +00:00
minor chunk refactoring
- rename GetChunk -> GetChunkPos - rename SetChunk -> SetChunkPos
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user