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 ClearLayer(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { Nova.PostProcessing obj = (Nova.PostProcessing)ToLua.CheckObject <Nova.PostProcessing>(L, 1); obj.ClearLayer(); return(0); } else if (count == 2) { Nova.PostProcessing obj = (Nova.PostProcessing)ToLua.CheckObject <Nova.PostProcessing>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.ClearLayer(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.PostProcessing.ClearLayer")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }