Documentation ¶ Rendered for linux/amd64 windows/amd64 darwin/amd64 js/wasm Index ¶ func Register(m Exports) type Exports type FS type File type VM func NewVM(g script.Game, opts VMOptions) *VM func (vm *VM) Close() error func (vm *VM) Exec(s string) (reflect.Value, error) func (vm *VM) ExecFile(pkg string) error func (vm *VM) GetSymbol(name string, typ reflect.Type) (reflect.Value, bool, error) func (vm *VM) OnEvent(typ script.EventType) func (vm *VM) OnFrame() type VMOptions Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Register ¶ func Register(m Exports) Register additional libraries for the interpreter. Types ¶ type Exports ¶ type Exports struct { Symbols interp.Exports Context func(ctx context.Context, g script.Game) context.Context } type FS ¶ type FS interface { fs.FS fs.StatFS } type File ¶ type File interface { fs.File fs.ReadDirFile } type VM ¶ type VM struct { // contains filtered or unexported fields } func NewVM ¶ func NewVM(g script.Game, opts VMOptions) *VM func (*VM) Close ¶ func (vm *VM) Close() error func (*VM) Exec ¶ func (vm *VM) Exec(s string) (reflect.Value, error) func (*VM) ExecFile ¶ func (vm *VM) ExecFile(pkg string) error func (*VM) GetSymbol ¶ func (vm *VM) GetSymbol(name string, typ reflect.Type) (reflect.Value, bool, error) func (*VM) OnEvent ¶ func (vm *VM) OnEvent(typ script.EventType) func (*VM) OnFrame ¶ func (vm *VM) OnFrame() type VMOptions ¶ type VMOptions struct { Log *slog.Logger ScriptLog *slog.Logger MapsDir string ModsDir string } Source Files ¶ View all Source files fs.go fs_unix.go vm.go Directories ¶ Show internal Expand all Path Synopsis imports stdlib Click to show internal directories. Click to hide internal directories.