示例#1
0
    static int Set(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(GizmoPlane)))
            {
                GizmoPlane obj = (GizmoPlane)ToLua.ToObject(L, 1);
                obj.Set();
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(GizmoPlane), typeof(UnityEngine.Vector3[]), typeof(UnityEngine.Vector2[]), typeof(int[])))
            {
                GizmoPlane            obj  = (GizmoPlane)ToLua.ToObject(L, 1);
                UnityEngine.Vector3[] arg0 = ToLua.CheckObjectArray <UnityEngine.Vector3>(L, 2);
                UnityEngine.Vector2[] arg1 = ToLua.CheckObjectArray <UnityEngine.Vector2>(L, 3);
                int[] arg2 = ToLua.CheckNumberArray <int>(L, 4);
                obj.Set(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GizmoPlane.Set"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#2
0
 static int SetMaterial(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GizmoPlane           obj  = (GizmoPlane)ToLua.CheckObject(L, 1, typeof(GizmoPlane));
         UnityEngine.Material arg0 = (UnityEngine.Material)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Material));
         obj.SetMaterial(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#3
0
 static int SetColor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GizmoPlane        obj  = (GizmoPlane)ToLua.CheckObject(L, 1, typeof(GizmoPlane));
         UnityEngine.Color arg0 = ToLua.ToColor(L, 2);
         obj.SetColor(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#4
0
    static int set_triangles(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GizmoPlane obj  = (GizmoPlane)o;
            int[]      arg0 = ToLua.CheckNumberArray <int>(L, 2);
            obj.triangles = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index triangles on a nil value" : e.Message));
        }
    }
示例#5
0
    static int set_uv(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GizmoPlane            obj  = (GizmoPlane)o;
            UnityEngine.Vector2[] arg0 = ToLua.CheckObjectArray <UnityEngine.Vector2>(L, 2);
            obj.uv = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index uv on a nil value" : e.Message));
        }
    }
示例#6
0
    static int get_triangles(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GizmoPlane obj = (GizmoPlane)o;
            int[]      ret = obj.triangles;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index triangles on a nil value" : e.Message));
        }
    }
示例#7
0
    static int get_uv(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GizmoPlane            obj = (GizmoPlane)o;
            UnityEngine.Vector2[] ret = obj.uv;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index uv on a nil value" : e.Message));
        }
    }
示例#8
0
 void Awake()
 {
     _GizimoPlane = GetComponent <GizmoPlane>();
 }