Documentation ¶
Index ¶
Constants ¶
View Source
const ( PacketUserJoin int32 = iota PacketUserLeave PacketAction PacketSendMessage PacketChunks PacketPlayerJoined PacketPlayerSelfJoined PacketPlayerDisconnected PacketUpdatePosition PacketUpdateSprite PacketUpdatePlayer PacketUpdateZombie PacketRemoveZombie PacketUseItem PacketSetHostile )
View Source
const ( // Actions ActionMoveUp int32 = iota ActionMoveDown ActionMoveLeft ActionMoveRight ActionToggleHostile )
View Source
const ( TerrainNothing byte = iota TerrainWater TerrainSand TerrainGrass )
View Source
const ( BlockNothing byte = iota BlockTree BlockGrass BlockWater BlockSand )
Variables ¶
View Source
var ( TerrainStyles = map[byte]tcell.Style{ TerrainNothing: StyleDefault, TerrainWater: tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorBlue), TerrainSand: tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorYellow), TerrainGrass: tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorGreen), } Terrain = map[byte]byte{ BlockNothing: ' ', BlockTree: 'T', BlockGrass: ' ', BlockWater: '~', BlockSand: '.', } )
View Source
var (
MovementActions = []int32{ActionMoveUp, ActionMoveDown, ActionMoveLeft, ActionMoveRight}
)
View Source
var (
StyleDefault = tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorWhite)
)
Functions ¶
func GetTerrainStyle ¶
func GetTerrainStyle(height byte) tcell.Style
func GetTerrainType ¶
func IsMovementAction ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.