コード例 #1
0
ファイル: ApiGet.cs プロジェクト: 583004700/IdeaProjects
        public bool GetMetatable(int idx)
        {
            var val = stack.get(idx);
            var mt  = LuaValue.getMetatable(val, this);

            if (mt != null)
            {
                stack.push(mt);
                return(true);
            }

            return(false);
        }
コード例 #2
0
ファイル: ApiArith.cs プロジェクト: 583004700/IdeaProjects
        public object getMetafield(object val, string fieldName, LuaState ls)
        {
            var mt = LuaValue.getMetatable(val, ls);

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