game

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TPS = 60

Variables

View Source
var GameData embed.FS

Functions

func Run

func Run(data embed.FS)

Types

type Game

type Game struct {
	Model  *model.Model
	Screen res.Screen
	Mouse  res.Mouse
	// contains filtered or unexported fields
}

Game container

func NewGame

func NewGame(mod *model.Model) Game

NewGame returns a new game

func (*Game) Draw

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

Draw the game.

func (*Game) Initialize

func (g *Game) Initialize()

Initialize the game.

func (*Game) Layout

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

Layout the game.

func (*Game) Run

func (g *Game) Run() error

Run the game.

func (*Game) Update

func (g *Game) Update() error

Update the game.

Directories

Path Synopsis
res

Jump to

Keyboard shortcuts

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