boids

package
v0.0.0-...-e42d693 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 1920
	ScreenHeight = 1080
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Boid

type Boid struct {
	// contains filtered or unexported fields
}

func NewBoid

func NewBoid(x, y float64, targetCenter vector.Vec2) *Boid

func (*Boid) Draw

func (b *Boid) Draw(screen *ebiten.Image)

func (*Boid) SetTargetCenter

func (b *Boid) SetTargetCenter(center vector.Vec2)

func (*Boid) Update

func (b *Boid) Update(boids []*Boid)

type Game

type Game struct {
	// contains filtered or unexported fields
}

func NewGame

func NewGame() (*Game, error)

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

func (*Game) Layout

func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*Game) Update

func (g *Game) Update() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL