コード例 #1
0
    static int LoadSprite(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                string arg0 = ToLua.CheckString(L, 1);
                System.Action <UnityEngine.Sprite> arg1 = (System.Action <UnityEngine.Sprite>)ToLua.CheckDelegate <System.Action <UnityEngine.Sprite> >(L, 2);
                GameAsset.LoadSprite(arg0, arg1);
                return(0);
            }
            else if (count == 3)
            {
                string arg0 = ToLua.CheckString(L, 1);
                System.Action <UnityEngine.Sprite> arg1 = (System.Action <UnityEngine.Sprite>)ToLua.CheckDelegate <System.Action <UnityEngine.Sprite> >(L, 2);
                bool arg2 = LuaDLL.luaL_checkboolean(L, 3);
                GameAsset.LoadSprite(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameAsset.LoadSprite"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }