Documentation ¶
Index ¶
- type Input
- type Local
- func (p *Local) BouncerHeight() float64
- func (p *Local) BouncerWidth() float64
- func (p *Local) Bounds() geometry.Rect
- func (p *Local) Name() string
- func (p *Local) Position() geometry.Vector
- func (p *Local) Reset()
- func (p *Local) SetPosition(y float64)
- func (p *Local) Side() geometry.Side
- func (p *Local) Update(input Input)
- type Network
- func (p *Network) BouncerHeight() float64
- func (p *Network) BouncerWidth() float64
- func (p *Network) Bounds() geometry.Rect
- func (p *Network) Name() string
- func (p *Network) Position() geometry.Vector
- func (*Network) Reset()
- func (p *Network) SetPosition(y float64)
- func (p *Network) Side() geometry.Side
- func (*Network) Update(_ Input)
- type Player
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local represents a player that is controlled by the user.
func NewLocal ¶
func NewLocal(name string, side geometry.Side, screenWidth, screenHeight, fieldBorderWidth float64) *Local
NewLocal creates a new player to play locally.
func (*Local) BouncerHeight ¶
BouncerHeight returns the height of the bouncer.
func (*Local) BouncerWidth ¶
BouncerWidth returns the width of the bouncer.
func (*Local) SetPosition ¶
SetPosition sets the Y position of the player.
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network represents a player that is controlled by the network. It is used to represent the player on the other side of the network.
func NewNetwork ¶
NewNetwork creates a new player to play in a network game.
func (*Network) BouncerHeight ¶
BouncerHeight returns the height of the bouncer.
func (*Network) BouncerWidth ¶
BouncerWidth returns the width of the bouncer.
func (*Network) SetPosition ¶
SetPosition sets the Y position of the player.
Click to show internal directories.
Click to hide internal directories.