public GameEntity ReplacePolygonCollider2D(UnityEngine.PolygonCollider2D newValue)
    {
        var index     = GameComponentsLookup.PolygonCollider2D;
        var component = (Assets.Code.Components.PolygonCollider2DComponent)CreateComponent(index, typeof(Assets.Code.Components.PolygonCollider2DComponent));

        component.Value = newValue;
        ReplaceComponent(index, component);
        return(this);
    }
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new UnityEngine.PolygonCollider2D();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Пример #3
0
        static int _s_set_autoTiling(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.PolygonCollider2D __cl_gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.autoTiling = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Пример #4
0
        static int _s_set_points(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.PolygonCollider2D __cl_gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.points = (UnityEngine.Vector2[])translator.GetObject(L, 2, typeof(UnityEngine.Vector2[]));
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Пример #5
0
        static int _g_get_pathCount(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.PolygonCollider2D __cl_gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.pathCount);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static int _s_set_pathCount(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.PolygonCollider2D gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.pathCount = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
        static int _g_get_points(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.PolygonCollider2D gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.points);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.PolygonCollider2D o = (UnityEngine.PolygonCollider2D)obj;
     points     = o.points;
     pathCount  = o.pathCount;
     autoTiling = o.autoTiling;
 }
 public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
 {
     obj = base.WriteTo(obj, objects);
     if (obj == null)
     {
         return(null);
     }
     UnityEngine.PolygonCollider2D o = (UnityEngine.PolygonCollider2D)obj;
     o.points     = points;
     o.pathCount  = pathCount;
     o.autoTiling = autoTiling;
     return(o);
 }
Пример #10
0
        static int _m_CreatePrimitive(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.PolygonCollider2D __cl_gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int sides = LuaAPI.xlua_tointeger(L, 2);

                    __cl_gen_to_be_invoked.CreatePrimitive(sides);



                    return(0);
                }
                if (__gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3))
                {
                    int sides = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Vector2 scale; translator.Get(L, 3, out scale);

                    __cl_gen_to_be_invoked.CreatePrimitive(sides, scale);



                    return(0);
                }
                if (__gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <UnityEngine.Vector2>(L, 3) && translator.Assignable <UnityEngine.Vector2>(L, 4))
                {
                    int sides = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Vector2 scale; translator.Get(L, 3, out scale);
                    UnityEngine.Vector2 offset; translator.Get(L, 4, out offset);

                    __cl_gen_to_be_invoked.CreatePrimitive(sides, scale, offset);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.PolygonCollider2D.CreatePrimitive!"));
        }
        public static Regulus.CustomType.Polygon ToRegulusPolygon(this UnityEngine.PolygonCollider2D collider)
        {
            var len = collider.points.Length;
            List<Vector2> points = new List<Vector2>();
            for (int i = 0 ; i < len  ; ++i)
            {
                var point = collider.points[i];
                var worldPoint = collider.transform.TransformPoint(point);
                var connr =CameraHelper.Front.GetScreenPoint(worldPoint);

                points.Add( new Regulus.CustomType.Vector2(connr.x , connr.y));
            }
            Regulus.CustomType.Polygon polygon = new Regulus.CustomType.Polygon(points.ToArray());

            return polygon;
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    var gen_ret = new UnityEngine.PolygonCollider2D();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.PolygonCollider2D constructor!"));
        }
        static int _m_GetPath(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.PolygonCollider2D gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int _index = LuaAPI.xlua_tointeger(L, 2);

                    var gen_ret = gen_to_be_invoked.GetPath(_index);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <System.Collections.Generic.List <UnityEngine.Vector2> >(L, 3))
                {
                    int _index = LuaAPI.xlua_tointeger(L, 2);
                    System.Collections.Generic.List <UnityEngine.Vector2> _points = (System.Collections.Generic.List <UnityEngine.Vector2>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List <UnityEngine.Vector2>));

                    var gen_ret = gen_to_be_invoked.GetPath(_index, _points);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.PolygonCollider2D.GetPath!"));
        }
        static int _m_GetTotalPointCount(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.PolygonCollider2D gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);



                {
                    var gen_ret = gen_to_be_invoked.GetTotalPointCount(  );
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #15
0
        static int _m_SetPath(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.PolygonCollider2D __cl_gen_to_be_invoked = (UnityEngine.PolygonCollider2D)translator.FastGetCSObj(L, 1);


            try {
                {
                    int index = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Vector2[] points = (UnityEngine.Vector2[])translator.GetObject(L, 3, typeof(UnityEngine.Vector2[]));

                    __cl_gen_to_be_invoked.SetPath(index, points);



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