예제 #1
0
        static int _m_Transform(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Core.FMath.FVec2 __cl_gen_to_be_invoked; translator.Get(L, 1, out __cl_gen_to_be_invoked);



                {
                    Core.FMath.FMat2 matrix; translator.Get(L, 2, out matrix);

                    Core.FMath.FVec2 __cl_gen_ret = __cl_gen_to_be_invoked.Transform(matrix);
                    translator.Push(L, __cl_gen_ret);


                    translator.Update(L, 1, __cl_gen_to_be_invoked);


                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
예제 #2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    float value = (float)LuaAPI.lua_tonumber(L, 2);

                    Core.FMath.FVec2 __cl_gen_ret = new Core.FMath.FVec2(value);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    float x = (float)LuaAPI.lua_tonumber(L, 2);
                    float y = (float)LuaAPI.lua_tonumber(L, 3);

                    Core.FMath.FVec2 __cl_gen_ret = new Core.FMath.FVec2(x, y);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <Core.FMath.Fix64>(L, 2))
                {
                    Core.FMath.Fix64 value; translator.Get(L, 2, out value);

                    Core.FMath.FVec2 __cl_gen_ret = new Core.FMath.FVec2(value);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <Core.FMath.Fix64>(L, 2) && translator.Assignable <Core.FMath.Fix64>(L, 3))
                {
                    Core.FMath.Fix64 x; translator.Get(L, 2, out x);
                    Core.FMath.Fix64 y; translator.Get(L, 3, out y);

                    Core.FMath.FVec2 __cl_gen_ret = new Core.FMath.FVec2(x, y);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }

                if (LuaAPI.lua_gettop(L) == 1)
                {
                    translator.Push(L, default(Core.FMath.FVec2));
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to Core.FMath.FVec2 constructor!"));
        }
예제 #3
0
        static int _m_Normalize_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    Core.FMath.FVec2 v; translator.Get(L, 1, out v);

                    Core.FMath.FVec2 __cl_gen_ret = Core.FMath.FVec2.Normalize(v);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
예제 #4
0
        static int _m_ClampMagnitude_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    Core.FMath.FVec2 v; translator.Get(L, 1, out v);
                    Core.FMath.Fix64 maxLength; translator.Get(L, 2, out maxLength);

                    Core.FMath.FVec2 __cl_gen_ret = Core.FMath.FVec2.ClampMagnitude(v, maxLength);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
예제 #5
0
        static int _m_Lerp_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    Core.FMath.FVec2 from; translator.Get(L, 1, out from);
                    Core.FMath.FVec2 to; translator.Get(L, 2, out to);
                    Core.FMath.Fix64 t; translator.Get(L, 3, out t);

                    Core.FMath.FVec2 __cl_gen_ret = Core.FMath.FVec2.Lerp(from, to, t);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }