Exemple #1
0
 public LuaBeatEvent(LuaTable table)
 {
     this.self     = table;
     this.luaState = table.GetLuaState();
     this.self.AddRef();
     this._add    = this.self.GetLuaFunction("Add");
     this._remove = this.self.GetLuaFunction("Remove");
 }
Exemple #2
0
        //LuaFunction _call = null;

        public LuaBeatEvent(LuaTable table)
        {
            self     = table;
            luaState = table.GetLuaState();
            self.AddRef();

            _add    = self.GetLuaFunction("Add");
            _remove = self.GetLuaFunction("Remove");
            //_call = self.GetLuaFunction("__call");
        }
Exemple #3
0
        //LuaFunction _call = null;

        public LuaEvent(LuaTable table)            
        {
            self = table;
            luaState = table.GetLuaState();
            self.AddRef();

            _add = self.RawGetLuaFunction("Add");
            _remove = self.RawGetLuaFunction("Remove");
            //_call = self.RawGetLuaFunction("__call");            
        }
Exemple #4
0
        //LuaFunction _call = null;

        public LuaEvent(LuaTable table)            
        {
            self = table;
            luaState = table.GetLuaState();
            self.AddRef();

            LuaTable meta = self.GetMetaTable();
            _add = meta.RawGetLuaFunction("Add");
            _remove = meta.RawGetLuaFunction("Remove");
            meta.Dispose();
            meta = null;
            //_call = self.RawGetLuaFunction("__call");            
        }
        //LuaFunction _call = null;

        #region constructor

        public LuaBeatEvent(LuaTable table)
        {
            self = table;
            // 获取参数 table 的 luaState 字段的值
            luaState = table.GetLuaState();
            // 增加引用计数
            self.AddRef();

            // 获取 self 中的 Add 和 Remove 方法
            _add    = self.GetLuaFunction("Add");
            _remove = self.GetLuaFunction("Remove");
            //_call = self.GetLuaFunction("__call");
        }
 public LuaDictTable(LuaTable table)
 {
     table.AddRef();
     this.table = table;
     this.state = table.GetLuaState();
 }