]> git.bts.cx Git - jurassic-tween.git/blob - Scripts/Runtime/TweenParameters.cs
[FEATURE] Initial Release
[jurassic-tween.git] / Scripts / Runtime / TweenParameters.cs
1 //
2 // TweenParameters.cs
3 // JurassicTween
4 //
5 // Created by Benjamin Sherratt on 04/05/2021.
6 // Copyright © 2021 SKFX Ltd. All rights reserved.
7 //
8
9 using UnityEngine;
10
11 namespace JurassicTween {
12     public struct TweenParameters {
13         public static readonly TweenParameters linear = new TweenParameters(Interpolation.Linear);
14         public static readonly TweenParameters easeInOut = new TweenParameters(Interpolation.EaseInOut);
15
16         public enum Interpolation {
17             Linear,
18             EaseInOut,
19             CustomCurve,
20         }
21
22         public Interpolation interpolation;
23         public AnimationCurve customCurve;
24
25         public TweenParameters(AnimationCurve customCurve) {
26             interpolation = Interpolation.CustomCurve;
27             this.customCurve = customCurve;
28         }
29
30         TweenParameters(Interpolation interpolation) {
31             this.interpolation = interpolation;
32             this.customCurve = null;
33         }
34     }
35 }