engine

package
v0.0.0-...-b5e2f65 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FPS int64
)
View Source
var NoLoadLuaFuncError = xrror.Xrror("load lua function has not been specified.")

Functions

This section is empty.

Types

type Config

type Config interface {
	Order() int
	Configure(*Engine) error
}

func DefaultConfig

func DefaultConfig(fn ConfigFn) Config

func NewConfig

func NewConfig(order int, fn ConfigFn) Config

func SetErrorHandler

func SetErrorHandler(fn HandleErrorFunc) Config

func SetGraphics

func SetGraphics(s string) Config

func SetLogger

func SetLogger(k string) Config

func SetLua

func SetLua(file string) Config

func SetRenders

func SetRenders(s string) Config

type ConfigFn

type ConfigFn func(*Engine) error

type Configuration

type Configuration interface {
	Add(...Config)
	AddFn(...ConfigFn)
	Configure() error
	Configured() bool
}

type Engine

type Engine struct {
	Configuration
	log.Logger

	FPS int64
	// contains filtered or unexported fields
}

func New

func New(debug bool, cnf ...Config) (*Engine, error)

func (*Engine) Close

func (e *Engine) Close()

func (*Engine) HandleError

func (e *Engine) HandleError(r error)

func (*Engine) KUEvent

func (e *Engine) KUEvent(k glfw.Key, m glfw.ModifierKey)

func (*Engine) Kill

func (e *Engine) Kill()

func (*Engine) Run

func (e *Engine) Run()

type HandleErrorFunc

type HandleErrorFunc func(*Engine, error)

type LoadLuaModuleFunc

type LoadLuaModuleFunc func() error

Jump to

Keyboard shortcuts

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