game

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	//QuitGame stops the game loop and causes the Gome.Run to return
	QuitGame()
	//Graphics returns the graphics adapter
	Graphics() graphics.System
	//Graphics returns the input adapter
	Input() input.System
	//Audio returns the audio adapter
	Audio() audio.System
}

Context is passed to Interface.Update and Interface.Draw to access the game's systems, etc.

type Interface

type Interface interface {
	//CreateAdapters is called by gome once to get the necessary adapters
	CreateAdapters() (adapters.System, error)
	//Initialize is called by Gome once after calling Gome.Run
	Initialize(context Context) error
	//Update is called by Gome periodically to update the game's state
	Update(timeDelta float32, context Context) error
	//Draw is called by Gome periodically to draw the game to the screen
	Draw(timeDelta float32, context Context) error
}

Interface must be implemented to be run by Gome

type Settings

type Settings interface {
	WindowSettings() *graphics.WindowSettings
}

Jump to

Keyboard shortcuts

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