Documentation ¶
Overview ¶
This file describes general interfaces that game objects should try to take advantage of.
provides some handy lua functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LuaAtPanic ¶
function that lua will call before aborting. we override this because normally lua longjmps, but that breaks go's defer/panic. so we just panic.
func StrToTermboxAttr ¶
Types ¶
type LuaConfig ¶
type LuaConfig struct {
// contains filtered or unexported fields
}
LuaConfig conveniently wraps a lua file as a go map, and config elements can be accesses through Get().
func NewLuaConfig ¶
Construct a new LuaConfig given the lua state and file name. Returns *LuaConfig, nil on success and nil, error on error. Expects that the file provided is a lua script that will return a table of strings to values, for example:
config = { key = "value", boolean = false, }
return config
func (*LuaConfig) Chan ¶
func (lc *LuaConfig) Chan() <-chan LuaConfigElement
Gives a channel which will contain top-level config elements
type LuaConfigElement ¶
type LuaConfigElement struct { Key string Value interface{} }