Versions in this module Expand all Collapse all v1 v1.0.0 Feb 16, 2020 Changes in this version + const ALLDIR + const DOWN + const DOWNLEFT + const DOWNRIGHT + const LEFT + const LEFTDOWNRIGHT + const LEFTRIGHT + const LEFTUPRIGHT + const MaxPacketSize + const RIGHT + const UP + const UPDOWN + const UPDOWNLEFT + const UPDOWNRIGHT + const UPLEFT + const UPRIGHT + var Debug = false + var ErrLength = errors.New("type length is wrong") + var ErrZero = errors.New("id is zero") + func Connect(userid uint64, server string, options *ConnectOptions) (*net.TCPConn, error) + func DPAD(b byte) string + func Endian() binary.ByteOrder + func GenUUID() uint64 + func MSG(b byte) string + func Sprint64(i uint64) string + func SprintByte(c byte) string + func TYPE(t types.Type) string + func Vec2Dir(v pixel.Vec) byte + type ClientUpdate struct + T string + UpdateTick time.Duration + func (s ClientUpdate) Type() types.Type + type Component interface + String func() string + Type func() types.Type + Value func() interface{} + type ConnectOptions struct + type DIR byte + func (dd DIR) Vec() pixel.Vec + type ExpBar struct + type HealthBar struct + type HealthReport struct + M map[uint64]HealthStatus + type HealthStatus struct + Cur float64 + Dam float64 + From uint64 + ID uint64 + Max float64 + type Login struct + ID uint64 + Password [32]byte + func (l *Login) Decode(b []byte) (err error) + func (l Login) Encode(b []byte) (n int, err error) + func (l Login) EncodeTo(w io.Writer) (n int, err error) + func (l Login) Type() types.Type + type ManaBar struct + type Message struct + Action uint16 + Count uint16 + Dpad byte + Key int16 + Keymod int16 + UnusedPad byte + func (p Message) String() string + func (p Message) Type() types.Type + type Ping struct + ID uint64 + Time time.Time + func (l Ping) Encode(b []byte) (n int, err error) + func (l Ping) Type() types.Type + func (p Ping) String() string + type Player struct + EntityType uint16 + HP float64 + MP float64 + PID uint64 + PosX float64 + PosY float64 + func (e *Player) DealDamage(from uint64, amount float64) float64 + func (e *Player) SetHealth(hp float64) + func (e Player) Health() float64 + func (p *Player) MoveTo(xy [2]float64) + func (p Player) ID() uint64 + func (p Player) Pos() pixel.Vec + func (p Player) Type() types.Type + func (p Player) X() float64 + func (p Player) Y() float64 + type PlayerAction struct + Action uint16 + At [2]int64 + DPad byte + HP float64 + ID uint64 + func (p PlayerAction) Pos() [2]float64 + func (p PlayerAction) Type() types.Type + type PlayerLogoff struct + UID uint64 + func (p PlayerLogoff) Type() types.Type + type PlayerMessage struct + From uint64 + Message string + To uint64 + func (p PlayerMessage) Type() types.Type + type Pong Ping + func (p Pong) Type() types.Type + type ServerUpdate struct + Restart bool + T string + UpdateTick time.Duration + func (s ServerUpdate) Type() types.Type + type StatBar struct + Current uint16 + Max uint16 + StatType types.Type + func (s StatBar) CurrentMax() float64 + func (s StatBar) Type() types.Type + type StatBar64 struct + Current uint64 + Max uint64 + StatType types.Type + func (s StatBar64) CurrentMax() float64 + func (s StatBar64) Type() types.Type + type StatusEffect struct + StatusType types.Type + func (s StatusEffect) Type() types.Type