Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayDiffResult ¶
func ArrayDiff ¶
func ArrayDiff(old []*Client, new []*Client) ArrayDiffResult
type CarPosPacket ¶
type CarPosPacket struct {
// contains filtered or unexported fields
}
func (*CarPosPacket) Packet ¶
func (p *CarPosPacket) Packet() []byte
Packet returns the packet data with the packet time replaced by the argument.
func (*CarPosPacket) Pos ¶
func (p *CarPosPacket) Pos() math.Vector2D
Pos returns the car position as a Vector2D.
func (*CarPosPacket) Rotation ¶
func (p *CarPosPacket) Rotation() float64
Rotation returns the car rotation in degrees.
func (*CarPosPacket) Update ¶
func (p *CarPosPacket) Update(packet []byte)
Update updates CarPosPacket with the specified byte slice. The supplied slice shouldn't be modified after calling this method.
func (*CarPosPacket) Valid ¶
func (p *CarPosPacket) Valid() bool
Valid returns true if CarPosPacket contains valid packet data.
type Client ¶
type Client struct { Addr *net.UDPAddr LastPacket time.Time PersonaName string // contains filtered or unexported fields }
func (Client) GetRotation ¶
GetRotation returns the current rotation of the client.
func (Client) IsReady ¶
IsReady returns true if the client is ready to be broadcasted to other clients. This means that the server has valid channel info, player info and position data of the client.
func (*Client) SendRawPacket ¶
SendRawPacket sends a raw UDP packet to the client.
type ClientConfig ¶
type Config ¶
func DefaultConfig ¶
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.