Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { Register chan *Player Unregister chan uint32 // Player IDS sent to this channel will be deleted from the players map // contains filtered or unexported fields }
Manager tracks the player data.
func CreateManager ¶
func CreateManager() *Manager
CreateManager will create and return a Manager instance
type Player ¶
type Player struct { ID uint32 `json:"id"` Name string `json:"name"` Position vector.Vector `json:"position"` Destination vector.Vector `json:"-"` // The position that the player is moving towards. }
Player is used to hold player data.
func (*Player) MoveToDest ¶
func (p *Player) MoveToDest()
MoveToDest will move the player towards the destination.
Click to show internal directories.
Click to hide internal directories.