public static FloatTweenAction AEVerticalNormalizedPosition(this ScrollRect obj, float position, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEVerticalNormalizedPosition_Getter)
            .SetSetterWithPayload(AEVerticalNormalizedPosition_Setter)
            .SetPayload(obj)
            .SetEndValue(position)
            .SetDuration(duration));
 }
Esempio n. 2
0
 public static FloatTweenAction AESizeDeltaY(this RectTransform obj, float size, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AESizeDeltaY_Getter)
            .SetSetterWithPayload(AESizeDeltaY_Setter)
            .SetPayload(obj)
            .SetEndValue(size)
            .SetDuration(duration));
 }
Esempio n. 3
0
 public static FloatTweenAction AEFov(this Camera cam, float fov, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEFov_Getter)
            .SetSetterWithPayload(AEFov_Setter)
            .SetPayload(cam)
            .SetEndValue(fov)
            .SetDuration(duration));
 }
Esempio n. 4
0
 public static Vector2TweenAction AEAnchorPos(this RectTransform obj, Vector2 anchorPos, float duration)
 {
     return(AE.Prepare <Vector2TweenAction>()
            .SetGetterWithPayload(AEAnchorPos_Getter)
            .SetSetterWithPayload(AEAnchorPos_Setter)
            .SetPayload(obj)
            .SetEndValue(anchorPos)
            .SetDuration(duration));
 }
 public static ColorTweenAction AEColor(this Graphic obj, Color color, float duration)
 {
     return(AE.Prepare <ColorTweenAction>()
            .SetGetterWithPayload(AEColor_Getter)
            .SetSetterWithPayload(AEColor_Setter)
            .SetPayload(obj)
            .SetEndValue(color)
            .SetDuration(duration));
 }
 public static FloatTweenAction AEFade(this CanvasGroup obj, float alpha, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEFade2_Getter)
            .SetSetterWithPayload(AEFade2_Setter)
            .SetPayload(obj)
            .SetEndValue(alpha)
            .SetDuration(duration));
 }
 public static Vector3TweenAction AEMove(this Transform obj, Vector3 position, float duration)
 {
     return(AE.Prepare <Vector3TweenAction>()
            .SetGetterWithPayload(AEMove_Getter)
            .SetSetterWithPayload(AEMove_Setter)
            .SetPayload(obj)
            .SetEndValue(position)
            .SetDuration(duration));
 }
 public static FloatTweenAction AEMoveY(this Transform obj, float y, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEMoveY_Getter)
            .SetSetterWithPayload(AEMoveY_Setter)
            .SetPayload(obj)
            .SetEndValue(y)
            .SetDuration(duration));
 }
 public static Vector3TweenAction AELocalRotate(this Transform obj, Vector3 angle, float duration)
 {
     return(AE.Prepare <Vector3TweenAction>()
            .SetGetterWithPayload(AELocalRotate_Getter)
            .SetSetterWithPayload(AELocalRotate_Setter)
            .SetPayload(obj)
            .SetEndValue(angle)
            .SetDuration(duration));
 }
 public static FloatTweenAction AEScaleZ(this Transform obj, float z, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEScaleZ_Getter)
            .SetSetterWithPayload(AEScaleZ_Setter)
            .SetPayload(obj)
            .SetEndValue(z)
            .SetDuration(duration));
 }
 public static Vector3TweenAction AEScale(this Transform obj, float scale, float duration)
 {
     return(AE.Prepare <Vector3TweenAction>()
            .SetGetterWithPayload(AEScale_Getter)
            .SetSetterWithPayload(AEScale_Setter)
            .SetPayload(obj)
            .SetEndValue(Vector3.one * scale)
            .SetDuration(duration));
 }
 public static FloatTweenAction AELocalMoveX(this Transform obj, float x, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AELocalMoveX_Getter)
            .SetSetterWithPayload(AELocalMoveX_Setter)
            .SetPayload(obj)
            .SetEndValue(x)
            .SetDuration(duration));
 }
 public static FloatTweenAction AEIntensity(this Light obj, float intensity, float duration)
 {
     return(AE.Prepare <FloatTweenAction>()
            .SetGetterWithPayload(AEIntensity_Getter)
            .SetSetterWithPayload(AEIntensity_Setter)
            .SetPayload(obj)
            .SetEndValue(intensity)
            .SetDuration(duration));
 }
 public static ShakeTweenAction AEShakeLocalPosition(this Transform obj, Vector3 strength, float vibrato, float duration)
 {
     return(AE.Prepare <ShakeTweenAction>()
            .SetGetterWithPayload(AEShakeLocalPosition_Getter)
            .SetSetterWithPayload(AEShakeLocalPosition_Setter)
            .SetPayload(obj)
            .SetStrength(strength)
            .SetVibrato(vibrato)
            .SetDuration(duration));
 }
        public static PathAction AELocalPath(this Transform obj, float duration, params Vector3[] points)
        {
            var action = AE.Prepare <PathAction>()
                         .SetSetter((x) => obj.localPosition = x)
                         .SetDuration(duration);

            for (var i = 0; i < points.Length; ++i)
            {
                action.AddPoint(points[i]);
            }
            return(action);
        }
        private void ReloadAndPlay(AEScriptRunner obj)
        {
            obj.UseLiveScript();
            obj.Kill();
            obj.Load();

            // Add delay to compensate script loading time
            var action = AE.Sequence(
                AE.Delay(0.5f),
                AE.Script(() => obj.Play())
                );

            if (obj.Unscaled)
            {
                action.PlayUnscaled();
            }
            else
            {
                action.Play();
            }
        }