protected override void OnEnter(Action onAnimationFinish)
        {
            CalculateTransform(out var newPos, out var newSize);
            AnimationEntry entry = GetBaseAnimationEntry();

            if (barrelMaterial != null)
            {
                uiPP.PushMaterial(barrelMaterialInstance);
                barrelMaterialInstance.SetFloat(BarrelShaderCurvaturePropertyID, 0);
                entry = entry.Then(
                    new MaterialFloatAnimationProperty(barrelMaterialInstance, BarrelShaderCurvatureProperty, 0,
                                                       barrelCurvature),
                    barrelDuration
                    )
                        .Then(new ActionAnimationProperty(() => uiPP.ClearLayer()))
                        .Then(GetOpacityAnimationProperty(0, 1), fadeDuration)
                        .Then(new RectTransformAnimationProperty(rt, newPos, pos0, newSize, size0), scaleDuration)
                        .With(enterFunction);
            }
            else
            {
                entry = entry.Then(GetOpacityAnimationProperty(0, 1), fadeDuration)
                        .Then(new RectTransformAnimationProperty(rt, newPos, pos0, newSize, size0), scaleDuration)
                        .With(enterFunction);
            }

            if (onAnimationFinish != null)
            {
                entry.Then(new ActionAnimationProperty(onAnimationFinish));
            }
        }
    static int PushMaterial(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                Nova.PostProcessing  obj  = (Nova.PostProcessing)ToLua.CheckObject <Nova.PostProcessing>(L, 1);
                UnityEngine.Material arg0 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 2);
                obj.PushMaterial(arg0);
                return(0);
            }
            else if (count == 3)
            {
                Nova.PostProcessing obj = (Nova.PostProcessing)ToLua.CheckObject <Nova.PostProcessing>(L, 1);
                int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
                UnityEngine.Material arg1 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 3);
                obj.PushMaterial(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.PostProcessing.PushMaterial"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }