public void Sort(LuaFunction compare) { this.list.Sort((a, b) => { LuaValue result = compare.Invoke(new LuaValue[] { a, b }); LuaBoolean boolValue = result as LuaBoolean; if (boolValue != null && boolValue.BoolValue == true) { return 1; } else { return -1; } }); }
public LuaFunction Register(string name, LuaFunc function) { LuaFunction luaFunc = new LuaFunction(function); this.SetNameValue(name, luaFunc); return luaFunc; }