Beispiel #1
0
        static int _m_MoveToCircleIntersection2D(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Pathfinding.Util.PathInterpolator gen_to_be_invoked = (Pathfinding.Util.PathInterpolator)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.Vector3 _circleCenter3D; translator.Get(L, 2, out _circleCenter3D);
                    float             _radius    = (float)LuaAPI.lua_tonumber(L, 3);
                    PF.IMovementPlane _transform = (PF.IMovementPlane)translator.GetObject(L, 4, typeof(PF.IMovementPlane));

                    gen_to_be_invoked.MoveToCircleIntersection2D(
                        _circleCenter3D,
                        _radius,
                        _transform);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #2
0
        static int _m_ToPlane(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                PF.IMovementPlane gen_to_be_invoked = (PF.IMovementPlane)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 _p; translator.Get(L, 2, out _p);

                    UnityEngine.Vector2 gen_ret = gen_to_be_invoked.ToPlane(
                        _p);
                    translator.PushUnityEngineVector2(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 _p; translator.Get(L, 2, out _p);
                    float _elevation;

                    UnityEngine.Vector2 gen_ret = gen_to_be_invoked.ToPlane(
                        _p,
                        out _elevation);
                    translator.PushUnityEngineVector2(L, gen_ret);
                    LuaAPI.lua_pushnumber(L, _elevation);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to PF.IMovementPlane.ToPlane!"));
        }