Documentation ¶
Index ¶
- type Capsule
- type Circle
- type Engine
- type Game
- type SpeedControl
- type Vec2
- func (u Vec2) Add(v Vec2) Vec2
- func (u Vec2) Angle() float64
- func (u Vec2) Cross(v Vec2) float64
- func (u Vec2) Dot(v Vec2) float64
- func (u Vec2) Len() float64
- func (u Vec2) Normal() Vec2
- func (u Vec2) Scaled(s float64) Vec2
- func (u Vec2) Sub(v Vec2) Vec2
- func (u Vec2) To(v Vec2) Vec2
- func (u Vec2) Unit() Vec2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capsule ¶
type Capsule struct {
// contains filtered or unexported fields
}
Capsule represents a line that can collide with circles
func NewCapsule ¶
NewCapsule creates a new line from (x1, y1) to (x2, y2)
type Circle ¶
type Circle struct {
// contains filtered or unexported fields
}
Circle represents a circle
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles collisions
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
Game implements ebiten.Game interface and stores the game state.
The methods run in the following order (each one is run once in this order if fps is 60 and display is 60 Hz):
Update Draw Layout
func (*Game) Draw ¶
func (g *Game) Draw(screen *ebiten.Image)
Draw is called every frame. The frame frequency depends on the display's refresh rate, so if the display is 60 Hz, Draw will be called 60 times per second.
type SpeedControl ¶
type SpeedControl struct {
// contains filtered or unexported fields
}
SpeedControl handles time dilation and pausing.
func NewSpeedControl ¶
func NewSpeedControl() *SpeedControl
NewSpeedControl initializes a new control at full speed.
Click to show internal directories.
Click to hide internal directories.