Пример #1
0
    static int SetSprite(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                cs.GuiImage obj  = (cs.GuiImage)ToLua.CheckObject <cs.GuiImage>(L, 1);
                string      arg0 = ToLua.CheckString(L, 2);
                obj.SetSprite(arg0);
                return(0);
            }
            else if (count == 3)
            {
                cs.GuiImage obj  = (cs.GuiImage)ToLua.CheckObject <cs.GuiImage>(L, 1);
                string      arg0 = ToLua.CheckString(L, 2);
                bool        arg1 = LuaDLL.luaL_checkboolean(L, 3);
                obj.SetSprite(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: cs.GuiImage.SetSprite"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #2
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiImage obj = (cs.GuiImage)ToLua.CheckObject <cs.GuiImage>(L, 1);
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
 static int ToImage(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiControl obj = (cs.GuiControl)ToLua.CheckObject <cs.GuiControl>(L, 1);
         cs.GuiImage   o   = obj.ToImage();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #4
0
 static int SetDefaultSprite(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         cs.GuiImage obj  = (cs.GuiImage)ToLua.CheckObject <cs.GuiImage>(L, 1);
         string      arg0 = ToLua.CheckString(L, 2);
         obj.SetDefaultSprite(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #5
0
 static int Initialize(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         cs.GuiImage obj = (cs.GuiImage)ToLua.CheckObject <cs.GuiImage>(L, 1);
         bool        o   = obj.Initialize();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #6
0
    static int get_UGUI_Image(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            cs.GuiImage          obj = (cs.GuiImage)o;
            UnityEngine.UI.Image ret = obj.UGUI_Image;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index UGUI_Image on a nil value"));
        }
    }