public Condition(Guid id, LuaSession luaSession) { this._id = id; this._luaSession = luaSession; this._code = "return false"; this._localVariables = new Dictionary <string, string>(); }
public Function(Guid id, LuaSession luaSession) { this._id = id; this._luaSession = luaSession; this._code = ""; this._localVariables = new Dictionary <string, string>(); }
public void setup(LuaSession session) { var lua = session.Lua; lua.RegisterFunction("nvprint", this, this.GetType().GetMethod("nvprint")); lua.RegisterFunction("variable", this, this.GetType().GetMethod("variable")); lua.RegisterFunction("setint", this, this.GetType().GetMethod("setInt")); lua.RegisterFunction("setfloat", this, this.GetType().GetMethod("setFloat")); lua.RegisterFunction("setbool", this, this.GetType().GetMethod("setBool")); lua.RegisterFunction("getint", this, this.GetType().GetMethod("getInt")); lua.RegisterFunction("getfloat", this, this.GetType().GetMethod("getFloat")); lua.RegisterFunction("getbool", this, this.GetType().GetMethod("getBool")); lua.RegisterFunction("entity", this, this.GetType().GetMethod("entity")); lua.RegisterFunction("entities", this, this.GetType().GetMethod("entities")); lua.RegisterFunction("addtag", this, this.GetType().GetMethod("addTag")); lua.RegisterFunction("deltag", this, this.GetType().GetMethod("delTag")); }
public Story() { this._luaSession = new LuaSession(); this._luaHelper = new LuaHelper(this); // this._identifiables = new List <Identifiable>(); this._delegates = new List <StoryDelgate>(); // this._mainGroup = makeGroup(); this._mainGroup.Label = "MainGroup"; this._mainGroup.MaxActivations = 0; this._luaHelper.setup(this._luaSession); this._luaSession.loadCLR(); // _luaSession.Lua.RegisterFunction("test", _luaHelper, _luaHelper.GetType().GetMethod("test")); // _lua.RegisterFunction("outputString", this, this.GetType().GetMethod("outputString")); // _lua.DoString("outputString(\"Hello, world!\")"); Console.WriteLine("Novella initialized."); }
public Selector(Guid id, LuaSession luaSession) { this._id = id; this._luaSession = luaSession; this._code = ""; }