Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayerHandler ¶
type PlayerHandler struct {
player.NopHandler // Embeds NopHandler to inherit default behavior.
// contains filtered or unexported fields
}
PlayerHandler handles player-specific events and delegates state updates.
func NewPlayerHandler ¶
func NewPlayerHandler(p *player.Player, s *session.Manager) *PlayerHandler
NewPlayerHandler creates a new PlayerHandler instance for the given player and session manager.
func (*PlayerHandler) HandleMove ¶
HandleMove is triggered whenever the player moves. It updates the chunk state and triggers any chunk-based logic.
func (*PlayerHandler) HandleQuit ¶
func (h *PlayerHandler) HandleQuit(p *player.Player)
HandleQuit is triggered when the player disconnects from the server. It performs cleanup such as removing state from memory.
Click to show internal directories.
Click to hide internal directories.