game

package
v0.0.0-...-d810e13 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeScene

func ChangeScene[ControllerAccessor any](ctx *Context, c gscene.Controller[ControllerAccessor])

Types

type Context

type Context struct {
	Input  *input.Handler
	Loader *resource.Loader
	Rand   gmath.Rand

	WindowWidth  int
	WindowHeight int
	// contains filtered or unexported fields
}

func NewContext

func NewContext() *Context

func (*Context) CurrentScene

func (ctx *Context) CurrentScene() gscene.GameRunner

func (*Context) NewLabel

func (ctx *Context) NewLabel(id resource.FontID) *graphics.Label

func (*Context) NewRect

func (ctx *Context) NewRect(width, height float64) *graphics.Rect

func (*Context) NewSprite

func (ctx *Context) NewSprite(id resource.ImageID) *graphics.Sprite

Jump to

Keyboard shortcuts

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