示例#1
0
        public bool GetMetatable(int idx)
        {
            var val = _stack.Get(idx);
            var mt  = LuaValue.GetMetatable(val, this);

            if (mt == null)
            {
                return(false);
            }
            _stack.Push(mt);
            return(true);
        }
示例#2
0
        private object GetMetafield(object val, string fieldName, LuaState ls)
        {
            var mt = LuaValue.GetMetatable(val, ls);

            return(mt?.Get(fieldName));
        }