Example #1
0
    static int ShowWithCallback(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            string arg0 = ToLua.CheckString(L, 1);
            DG.Tweening.TweenCallback arg1 = null;
            LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (DG.Tweening.TweenCallback)ToLua.CheckObject(L, 2, typeof(DG.Tweening.TweenCallback));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg1 = DelegateFactory.CreateDelegate(typeof(DG.Tweening.TweenCallback), func) as DG.Tweening.TweenCallback;
            }

            UIToast.ShowType arg2 = (UIToast.ShowType)ToLua.CheckObject(L, 3, typeof(UIToast.ShowType));
            UIToast.ShowWithCallback(arg0, arg1, arg2);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #2
0
    static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        UIToast.ShowType o = (UIToast.ShowType)arg0;
        ToLua.Push(L, o);
        return(1);
    }