engine

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupTypes added in v0.3.0

func SetupTypes(reg registry.Registry[resource.Type], extraTypes ...resource.Type) error

Types

type Config

type Config struct {
	WindowSize   topdown.Size[int]
	Fullscreen   bool
	ResourcesDir string
	ExtraTypes   []resource.Type
	StartMode    Mode
}

type Engine

type Engine interface {
	Initialize() error
	Run() error

	ebiten.Game
}

func New

func New(cfg *Config) Engine

type MakeTypeFunc

type MakeTypeFunc func() (resource.Type, error)

type Mode

type Mode interface {
	Initialize(screenSize topdown.Size[int], mgr resource.Manager) error

	Update() (Mode, error)
	Draw(screen *ebiten.Image)
	Layout(w, h int) (int, int)
}

Directories

Path Synopsis
Package mock_engine is a generated GoMock package.
Package mock_engine is a generated GoMock package.

Jump to

Keyboard shortcuts

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