コード例 #1
0
        protected virtual void OnPostInit()
        {
            luna.Register("luna.startCoroutine", _StartCoroutine);
            luna.Register("luna.stopCoroutine", _StopCoroutine);

            var L = luna.State;

            if (cjson)
            {
                LunaNative.luaopen_cjson(L);
            }

            if (protobuf)
            {
                lua_requiref(L, "pb", LunaNative.luaopen_pb);
            }
        }
コード例 #2
0
        public void Start()
        {
            GenerateWraps();

            luna.Start();
            luna.AddSearcher(Loader);

            var L = luna.State;

            lua_requiref(L, "pb", LunaNative.luaopen_pb);
            LunaNative.luaopen_cjson(L);

            luna.DoFile("vec3.luna");

            Converter.RegUnmanagedConverter <vec3>(L);

            luna.DoFile("TestValue.luna");
            Converter.Register <TestValue>(new TestValueTypeConverter(L));
        }