game

package
v0.0.0-...-d12af05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScreenSize

func ScreenSize() (int, int)

Types

type Game

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

Game implements ebiten.Game interface.

func NewGame

func NewGame() *Game

func (*Game) Draw

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

Draw is called every frame (typically 1/60[s] for 60Hz display).

func (*Game) Layout

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

Layout takes the outside size (e.g., the window size) and returns the (logical) screen size.

func (*Game) Update

func (g *Game) Update() error

Update is called every tick (1/60 s by default).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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