game

package
v0.0.0-...-96a5699 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

func Init

func Init(c GameConfig) *Game

Init inits the Game struct

func (*Game) Draw

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

Draw handles the game draw cycle

func (*Game) Layout

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

Layout defines the game's logical size

func (*Game) Update

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

Update handles the game logic update cycle

type GameConfig

type GameConfig struct {
	Title string

	TileSize uint
	SizeX    int
	SizeY    int
}

Jump to

Keyboard shortcuts

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