game

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TPS = 30

Variables

This section is empty.

Functions

func Run

func Run(layout string, paramsFile string)

Types

type Game

type Game struct {
	Model  *model.Model
	Screen res.Screen
	Mouse  res.Mouse

	Systems []model.System
	// 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) InitializeRun

func (g *Game) InitializeRun()

Initialize a new run.

func (*Game) Layout

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

Layout the game.

func (*Game) Reset

func (g *Game) Reset()

Reset 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

Jump to

Keyboard shortcuts

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