lua

package
v0.0.0-...-67a1e62 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log = log.New("lua")
)

Functions

This section is empty.

Types

type APIFunc

type APIFunc func(vm *lua.LState, tm *script.Timers, g script.Game) *lua.LTable

type VM

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

func NewVM

func NewVM(g script.Game, dir string, opts ...lua.Options) *VM

func (*VM) Close

func (vm *VM) Close() error

func (*VM) Error

func (vm *VM) Error(L *lua.LState, err error) int

func (*VM) Exec

func (vm *VM) Exec(s string) (reflect.Value, error)

func (*VM) ExecFile

func (vm *VM) ExecFile(path string) error

func (*VM) GetSymbol

func (vm *VM) GetSymbol(name string, typ reflect.Type) (reflect.Value, bool, error)

func (*VM) InitAPI

func (vm *VM) InitAPI(global string, fnc APIFunc) *lua.LTable

func (*VM) OnEvent

func (vm *VM) OnEvent(typ script.EventType)

func (*VM) OnFrame

func (vm *VM) OnFrame()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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