Documentation
¶
Index ¶
- type Ball
- type Local
- func (b *Local) Angle() float64
- func (b *Local) Bounces() int
- func (b *Local) Bounds() geometry.Rect
- func (b *Local) CheckGoal() (bool, geometry.Side)
- func (b *Local) Position() geometry.Vector
- func (b *Local) Reset() Ball
- func (*Local) SetAngle(_ float64)
- func (*Local) SetBounces(_ int)
- func (b *Local) SetPosition(pos geometry.Vector)
- func (b *Local) Update(p1Bounds, p2Bounds geometry.Rect)
- func (b *Local) Width() float64
- type Network
- func (b *Network) Angle() float64
- func (b *Network) Bounces() int
- func (b *Network) Bounds() geometry.Rect
- func (*Network) CheckGoal() (bool, geometry.Side)
- func (b *Network) Position() geometry.Vector
- func (*Network) Reset() Ball
- func (b *Network) SetAngle(angle float64)
- func (b *Network) SetBounces(bounces int)
- func (b *Network) SetPosition(pos geometry.Vector)
- func (*Network) Update(_, _ geometry.Rect)
- func (b *Network) Width() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ball ¶
type Ball interface { Angle() float64 Bounces() int Bounds() geometry.Rect CheckGoal() (bool, geometry.Side) Position() geometry.Vector Reset() Ball SetAngle(angle float64) SetBounces(bounces int) SetPosition(pos geometry.Vector) Update(p1Bounds, p2Bounds geometry.Rect) Width() float64 }
Ball represents a ball.
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local represents the ball in a local game.
func NewLocal ¶
NewLocal creates a new ball to play locally. screenWidth and screenHeight are the dimensions of the screen. lvl is the level of the game.
func (*Local) SetBounces ¶
SetBounces will panic because it is not implemented.
func (*Local) SetPosition ¶
SetPosition sets the position of the ball.
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network represents the ball in a network game.
func NewNetwork ¶
func NewNetwork() *Network
NewNetwork creates a new ball to play in a network game.
func (*Network) SetBounces ¶
SetBounces sets the number of bounces of the ball.
func (*Network) SetPosition ¶
SetPosition sets the position of the ball.
Click to show internal directories.
Click to hide internal directories.