Esempio n. 1
0
    static int SetClipRect(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        MaskableGraphic obj  = LuaScriptMgr.GetUnityObject <MaskableGraphic>(L, 1);
        Rect            arg0 = LuaScriptMgr.GetNetObject <Rect>(L, 2);
        bool            arg1 = LuaScriptMgr.GetBoolean(L, 3);

        obj.SetClipRect(arg0, arg1);
        return(0);
    }
Esempio n. 2
0
    static int SetClipRect(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        MaskableGraphic obj  = (MaskableGraphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MaskableGraphic");
        Rect            arg0 = (Rect)LuaScriptMgr.GetNetObject(L, 2, typeof(Rect));
        bool            arg1 = LuaScriptMgr.GetBoolean(L, 3);

        obj.SetClipRect(arg0, arg1);
        return(0);
    }
    private static int SetClipRect(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 3);
            MaskableGraphic maskableGraphic = (MaskableGraphic)ToLua.CheckObject(L, 1, typeof(MaskableGraphic));
            Rect            clipRect        = (Rect)ToLua.CheckObject(L, 2, typeof(Rect));
            bool            validRect       = LuaDLL.luaL_checkboolean(L, 3);
            maskableGraphic.SetClipRect(clipRect, validRect);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
    public static int SetClipRect(IntPtr l)
    {
        int result;

        try
        {
            MaskableGraphic maskableGraphic = (MaskableGraphic)LuaObject.checkSelf(l);
            Rect            clipRect;
            LuaObject.checkValueType <Rect>(l, 2, out clipRect);
            bool validRect;
            LuaObject.checkType(l, 3, out validRect);
            maskableGraphic.SetClipRect(clipRect, validRect);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }