game

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Debug constants.
	MaxDebug = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	*tetra3d.Camera
	// contains filtered or unexported fields
}

Camera is a player-controlled camera.

func NewCamera

func NewCamera(scene *tetra3d.Scene, player *tetra3d.Node) *Camera

func (*Camera) Update

func (c *Camera) Update() (bool, error)

type Game

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

Game represents the game state.

func (*Game) ConfigureEbitengine

func (g *Game) ConfigureEbitengine()

ConfigureEbitengine sets Ebitengine congiuration options.

func (*Game) Draw

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

Draw draws the game onto the screen.

func (*Game) Layout

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

Layout sets the canvas size.

func (*Game) SetCrosshair

func (g *Game) SetCrosshair(crosshair bool)

SetCrosshair sets a flag controlling whether a crosshair is drawn.

func (*Game) SetDebug

func (g *Game) SetDebug(debug int)

SetDebug sets a flag controlling whether debug information is printed on the screen.

func (*Game) SetQVGA

func (g *Game) SetQVGA(qvga bool)

SetQVGA sets a flag controlling whether the game runs at QVGA resolution.

func (*Game) Update

func (g *Game) Update() error

Update updates the game state.

Jump to

Keyboard shortcuts

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