game

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StageBattle = iota
	StageReward
	StageOverworld
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

Game implements the ebiten Game interface

var (
	Instance *Game
)

func New

func New(ctx context.Context, host string) (*Game, error)

New creates a new game instance

func (*Game) Draw

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

Draw is called for render update

func (*Game) Layout

func (g *Game) Layout(x, y int) (int, int)

Layout takes the outside size (e.g., the window size) and returns the (logical) screen size. If you don't have to adjust the screen size with the outside size, just return a fixed size.

func (*Game) Update

func (g *Game) Update() error

Update is for each update game

Jump to

Keyboard shortcuts

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