static public int GetPath(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         UnityEngine.Vector2[] a2;
         checkArray(l, 3, out a2);
         var ret = self.GetPath(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int GenerateGeometry(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         self.GenerateGeometry();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int GetPath(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(int), typeof(UnityEngine.Vector2[])))
         {
             UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             UnityEngine.Vector2[] a2;
             checkArray(l, 3, out a2);
             var ret = self.GetPath(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(int), typeof(List <UnityEngine.Vector2>)))
         {
             UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Collections.Generic.List <UnityEngine.Vector2> a2;
             checkType(l, 3, out a2);
             var ret = self.GetPath(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function GetPath to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int get_pointCount(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.pointCount);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GenerateGeometry(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         self.GenerateGeometry();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_geometryType(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.geometryType);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D o;
         o = new UnityEngine.CompositeCollider2D();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_geometryType(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         UnityEngine.CompositeCollider2D.GeometryType v;
         checkEnum(l, 2, out v);
         self.geometryType = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_edgeRadius(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.edgeRadius = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 10
0
    static int QPYX_get_composite_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        UnityEngine.Collider2D QPYX_obj_YXQP = (UnityEngine.Collider2D)QPYX_o_YXQP;
            UnityEngine.CompositeCollider2D QPYX_ret_YXQP = QPYX_obj_YXQP.composite;
            ToLua.PushSealed(L_YXQP, QPYX_ret_YXQP);
            return(1);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index composite on a nil value"));
        }
    }
 static public int GetPathPointCount(IntPtr l)
 {
     try {
         UnityEngine.CompositeCollider2D self = (UnityEngine.CompositeCollider2D)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetPathPointCount(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 12
0
    static int get_composite(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Collider2D          obj = (UnityEngine.Collider2D)o;
            UnityEngine.CompositeCollider2D ret = obj.composite;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index composite on a nil value"));
        }
    }
Ejemplo n.º 13
0
 /// <summary>
 /// Write the specified value using the writer.
 /// </summary>
 /// <param name="value">Value.</param>
 /// <param name="writer">Writer.</param>
 public override void Write(object value, ISaveGameWriter writer)
 {
     UnityEngine.CompositeCollider2D compositeCollider2D = (UnityEngine.CompositeCollider2D)value;
     writer.WriteProperty("geometryType", compositeCollider2D.geometryType);
     writer.WriteProperty("generationType", compositeCollider2D.generationType);
     writer.WriteProperty("vertexDistance", compositeCollider2D.vertexDistance);
     writer.WriteProperty("edgeRadius", compositeCollider2D.edgeRadius);
     writer.WriteProperty("density", compositeCollider2D.density);
     writer.WriteProperty("isTrigger", compositeCollider2D.isTrigger);
     writer.WriteProperty("usedByEffector", compositeCollider2D.usedByEffector);
     writer.WriteProperty("usedByComposite", compositeCollider2D.usedByComposite);
     writer.WriteProperty("offset", compositeCollider2D.offset);
     writer.WriteProperty("sharedMaterial", compositeCollider2D.sharedMaterial);
     writer.WriteProperty("enabled", compositeCollider2D.enabled);
     writer.WriteProperty("tag", compositeCollider2D.tag);
     writer.WriteProperty("name", compositeCollider2D.name);
     writer.WriteProperty("hideFlags", compositeCollider2D.hideFlags);
 }
Ejemplo n.º 14
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.CompositeCollider2D compositeCollider2D = (UnityEngine.CompositeCollider2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "geometryType":
                    compositeCollider2D.geometryType = reader.ReadProperty <UnityEngine.CompositeCollider2D.GeometryType> ();
                    break;

                case "generationType":
                    compositeCollider2D.generationType = reader.ReadProperty <UnityEngine.CompositeCollider2D.GenerationType> ();
                    break;

                case "vertexDistance":
                    compositeCollider2D.vertexDistance = reader.ReadProperty <System.Single> ();
                    break;

                case "edgeRadius":
                    compositeCollider2D.edgeRadius = reader.ReadProperty <System.Single> ();
                    break;

                case "density":
                    compositeCollider2D.density = reader.ReadProperty <System.Single> ();
                    break;

                case "isTrigger":
                    compositeCollider2D.isTrigger = reader.ReadProperty <System.Boolean> ();
                    break;

                case "usedByEffector":
                    compositeCollider2D.usedByEffector = reader.ReadProperty <System.Boolean> ();
                    break;

                case "usedByComposite":
                    compositeCollider2D.usedByComposite = reader.ReadProperty <System.Boolean> ();
                    break;

                case "offset":
                    compositeCollider2D.offset = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "sharedMaterial":
                    if (compositeCollider2D.sharedMaterial == null)
                    {
                        compositeCollider2D.sharedMaterial = reader.ReadProperty <UnityEngine.PhysicsMaterial2D> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.PhysicsMaterial2D> (compositeCollider2D.sharedMaterial);
                    }
                    break;

                case "enabled":
                    compositeCollider2D.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    compositeCollider2D.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    compositeCollider2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    compositeCollider2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Ejemplo n.º 15
0
 public void GenerateGeometry()
 {
     CompositeCollider2D.INTERNAL_CALL_GenerateGeometry(this);
 }
Ejemplo n.º 16
0
 private static extern void INTERNAL_CALL_GenerateGeometry(CompositeCollider2D self);
Ejemplo n.º 17
0
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.CompositeCollider2D compositeCollider2D = SaveGameType.CreateComponent <UnityEngine.CompositeCollider2D> ();
     ReadInto(compositeCollider2D, reader);
     return(compositeCollider2D);
 }