core

package
v0.0.0-...-8a9468f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ActionMoveLeft input.Action = iota
	ActionMoveRight
	ActionMoveUp
	ActionMoveDown
)

Variables

This section is empty.

Functions

func CreateGame

func CreateGame(title string, width int, height int)

func PlayMusic

func PlayMusic(path string)

func SetUpControls

func SetUpControls(game *Game)

Types

type Game

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

func (*Game) Draw

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

func (*Game) Layout

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

func (*Game) Update

func (g *Game) Update() error

type GameControls

type GameControls struct {
	Controls []struct {
		Action string       `toml:"action"`
		Keys   []string     `toml:"keys"`
		Axis   string       `toml:"axis"`
		Value  input.Action `toml:"value"`
	} `toml:"controls"`
}

Jump to

Keyboard shortcuts

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