game

package
v0.0.0-...-fc2dc21 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartGame

func StartGame()

Types

type Game

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

func NewGame

func NewGame() *Game

func (*Game) Draw

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

func (*Game) Layout

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

func (*Game) Update

func (g *Game) Update() error

type GameState

type GameState int
const (
	GameStateMenu GameState = iota
	GameStateGame
	GameStateOver
	GameStateCount
)

type Gameplay

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

func NewGameplay

func NewGameplay() *Gameplay

func (*Gameplay) Draw

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

func (*Gameplay) Update

func (g *Gameplay) Update() (GameState, error)
type Menu struct {
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu() *Menu
func (m *Menu) Draw(screen *ebiten.Image)
func (m *Menu) Update() (GameState, error)

type Scene

type Scene interface {
	Update() (GameState, error)
	Draw(screen *ebiten.Image)
}

Jump to

Keyboard shortcuts

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