...

Package engine

Overview ▾

Variables

ErrExit is the error returned when exiting normally.

var ErrExit = errors.New("exit")

type Game

Game is a venture game.

type Game struct {
    UpdateFunc func(screen *ebiten.Image) error

    sync.Mutex
    // contains filtered or unexported fields
}

func NewGame

func NewGame() *Game

NewGame returns a new venture game.

func (*Game) Draw

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

Draw draws the game.

func (*Game) Layout

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

func (*Game) NodeAt

func (g *Game) NodeAt(x float64, y float64) []world.Node

func (*Game) Run

func (g *Game) Run() error

func (*Game) SetRoot

func (g *Game) SetRoot(node world.Node)

SetRoot sets the root node of the game.

func (*Game) Update

func (g *Game) Update(screen *ebiten.Image) error

Update updates the game.