├── .gitattributes ├── .github └── workflows │ └── generate-docs.yml ├── .gitignore ├── .npmignore ├── .npmrc ├── CHANGELOG.md ├── CHANGELOG.md.meta ├── Documentation~ ├── articles │ ├── easing.md │ ├── events.md │ ├── index.md │ ├── installation.md │ ├── managing-tweens.md │ ├── property-chaining.md │ ├── sequences.md │ ├── settings.md │ ├── supported-types.md │ └── tweens.md ├── data │ ├── header.json │ └── sidenav.json ├── filterconfig.yml └── images │ └── settings.png ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── ColorExtensions.cs ├── ColorExtensions.cs.meta ├── Delegates.cs ├── Delegates.cs.meta ├── Ease.cs ├── Ease.cs.meta ├── EaseFunction.cs ├── EaseFunction.cs.meta ├── Extensions.meta ├── Extensions │ ├── Audio.meta │ ├── Audio │ │ ├── AudioChorusFilterTweens.cs │ │ ├── AudioChorusFilterTweens.cs.meta │ │ ├── AudioDistortionFilterTweens.cs │ │ ├── AudioDistortionFilterTweens.cs.meta │ │ ├── AudioEchoFilterTweens.cs │ │ ├── AudioEchoFilterTweens.cs.meta │ │ ├── AudioHighPassFilterTweens.cs │ │ ├── AudioHighPassFilterTweens.cs.meta │ │ ├── AudioListenerTweens.cs │ │ ├── AudioListenerTweens.cs.meta │ │ ├── AudioLowPassFilterTweens.cs │ │ ├── AudioLowPassFilterTweens.cs.meta │ │ ├── AudioReverbFilterTweens.cs │ │ ├── AudioReverbFilterTweens.cs.meta │ │ ├── AudioReverbZoneTweens.cs │ │ ├── AudioReverbZoneTweens.cs.meta │ │ ├── AudioSourceTweens.cs │ │ └── AudioSourceTweens.cs.meta │ ├── Misc.meta │ ├── Misc │ │ ├── AimConstraintTweens.cs │ │ ├── AimConstraintTweens.cs.meta │ │ ├── GridTweens.cs │ │ ├── GridTweens.cs.meta │ │ ├── LookAtConstraintTweens.cs │ │ ├── LookAtConstraintTweens.cs.meta │ │ ├── ParentConstraintTweens.cs │ │ ├── ParentConstraintTweens.cs.meta │ │ ├── PositionConstraintTweens.cs │ │ ├── PositionConstraintTweens.cs.meta │ │ ├── RectOffsetTweens.cs │ │ ├── RectOffsetTweens.cs.meta │ │ ├── RotationConstraintTweens.cs │ │ ├── RotationConstraintTweens.cs.meta │ │ ├── ScaleConstraintTweens.cs │ │ ├── ScaleConstraintTweens.cs.meta │ │ ├── TransformTweens.cs │ │ └── TransformTweens.cs.meta │ ├── Navigation.meta │ ├── Navigation │ │ ├── NavMeshAgentTweens.cs │ │ ├── NavMeshAgentTweens.cs.meta │ │ ├── NavMeshObstacleTweens.cs │ │ └── NavMeshObstacleTweens.cs.meta │ ├── Physics.meta │ ├── Physics │ │ ├── BoxColliderTweens.cs │ │ ├── BoxColliderTweens.cs.meta │ │ ├── CapsuleColliderTweens.cs │ │ ├── CapsuleColliderTweens.cs.meta │ │ ├── CharacterControllerTweens.cs │ │ ├── CharacterControllerTweens.cs.meta │ │ ├── CharacterJointTweens.cs │ │ ├── CharacterJointTweens.cs.meta │ │ ├── ClothTweens.cs │ │ ├── ClothTweens.cs.meta │ │ ├── ColliderTweens.cs │ │ ├── ColliderTweens.cs.meta │ │ ├── ConfigurableJointTweens.cs │ │ ├── ConfigurableJointTweens.cs.meta │ │ ├── ConstantForceTweens.cs │ │ ├── ConstantForceTweens.cs.meta │ │ ├── JointTweens.cs │ │ ├── JointTweens.cs.meta │ │ ├── PhysicMaterialTweens.cs │ │ ├── PhysicMaterialTweens.cs.meta │ │ ├── RigidbodyTweens.cs │ │ ├── RigidbodyTweens.cs.meta │ │ ├── SphereColliderTweens.cs │ │ ├── SphereColliderTweens.cs.meta │ │ ├── SpringJointTweens.cs │ │ ├── SpringJointTweens.cs.meta │ │ ├── WheelColliderTweens.cs │ │ └── WheelColliderTweens.cs.meta │ ├── Physics2D.meta │ ├── Physics2D │ │ ├── AnchoredJoint2DTweens.cs │ │ ├── AnchoredJoint2DTweens.cs.meta │ │ ├── AreaEffector2DTweens.cs │ │ ├── AreaEffector2DTweens.cs.meta │ │ ├── BoxCollider2DTweens.cs │ │ ├── BoxCollider2DTweens.cs.meta │ │ ├── BuoyancyEffector2DTweens.cs │ │ ├── BuoyancyEffector2DTweens.cs.meta │ │ ├── CapsuleCollider2DTweens.cs │ │ ├── CapsuleCollider2DTweens.cs.meta │ │ ├── CircleCollider2DTweens.cs │ │ ├── CircleCollider2DTweens.cs.meta │ │ ├── Collider2DTweens.cs │ │ ├── Collider2DTweens.cs.meta │ │ ├── CompositeCollider2DTweens.cs │ │ ├── CompositeCollider2DTweens.cs.meta │ │ ├── ConstantForce2DTweens.cs │ │ ├── ConstantForce2DTweens.cs.meta │ │ ├── DistanceJoint2DTweens.cs │ │ ├── DistanceJoint2DTweens.cs.meta │ │ ├── EdgeCollider2DTweens.cs │ │ ├── EdgeCollider2DTweens.cs.meta │ │ ├── FixedJoint2DTweens.cs │ │ ├── FixedJoint2DTweens.cs.meta │ │ ├── FrictionJoint2DTweens.cs │ │ ├── FrictionJoint2DTweens.cs.meta │ │ ├── Joint2DTweens.cs │ │ ├── Joint2DTweens.cs.meta │ │ ├── PhysicsMaterial2DTweens.cs │ │ ├── PhysicsMaterial2DTweens.cs.meta │ │ ├── PlatformEffector2DTweens.cs │ │ ├── PlatformEffector2DTweens.cs.meta │ │ ├── PointEffector2DTweens.cs │ │ ├── PointEffector2DTweens.cs.meta │ │ ├── RelativeJoint2DTweens.cs │ │ ├── RelativeJoint2DTweens.cs.meta │ │ ├── Rigidbody2DTweens.cs │ │ ├── Rigidbody2DTweens.cs.meta │ │ ├── SliderJoint2DTweens.cs │ │ ├── SliderJoint2DTweens.cs.meta │ │ ├── SpringJoint2DTweens.cs │ │ ├── SpringJoint2DTweens.cs.meta │ │ ├── SurfaceEffector2DTweens.cs │ │ ├── SurfaceEffector2DTweens.cs.meta │ │ ├── TargetJoint2DTweens.cs │ │ └── TargetJoint2DTweens.cs.meta │ ├── Rendering.meta │ ├── Rendering │ │ ├── AnimatorTweens.cs │ │ ├── AnimatorTweens.cs.meta │ │ ├── CameraTweens.cs │ │ ├── CameraTweens.cs.meta │ │ ├── LensFlareTweens.cs │ │ ├── LensFlareTweens.cs.meta │ │ ├── LightTweens.cs │ │ ├── LightTweens.cs.meta │ │ ├── LineRendererTweens.cs │ │ ├── LineRendererTweens.cs.meta │ │ ├── MaterialPropertyBlockTweens.cs │ │ ├── MaterialPropertyBlockTweens.cs.meta │ │ ├── MaterialTweens.cs │ │ ├── MaterialTweens.cs.meta │ │ ├── OcclusionAreaTweens.cs │ │ ├── OcclusionAreaTweens.cs.meta │ │ ├── ParticleSystemForceFieldTweens.cs │ │ ├── ParticleSystemForceFieldTweens.cs.meta │ │ ├── ParticleSystemTweens.cs │ │ ├── ParticleSystemTweens.cs.meta │ │ ├── ProjectorTweens.cs │ │ ├── ProjectorTweens.cs.meta │ │ ├── ReflectionProbeTweens.cs │ │ ├── ReflectionProbeTweens.cs.meta │ │ ├── SpriteMaskTweens.cs │ │ ├── SpriteMaskTweens.cs.meta │ │ ├── SpriteRendererTweens.cs │ │ ├── SpriteRendererTweens.cs.meta │ │ ├── SpriteShapeRendererTweens.cs │ │ ├── SpriteShapeRendererTweens.cs.meta │ │ ├── TilemapTweens.cs │ │ ├── TilemapTweens.cs.meta │ │ ├── TrailRendererTweens.cs │ │ ├── TrailRendererTweens.cs.meta │ │ ├── VideoPlayerTweens.cs │ │ ├── VideoPlayerTweens.cs.meta │ │ ├── WindZoneTweens.cs │ │ └── WindZoneTweens.cs.meta │ ├── UI.meta │ └── UI │ │ ├── AspectRatioFitterTweens.cs │ │ ├── AspectRatioFitterTweens.cs.meta │ │ ├── CanvasGroupTweens.cs │ │ ├── CanvasGroupTweens.cs.meta │ │ ├── CanvasScalerTweens.cs │ │ ├── CanvasScalerTweens.cs.meta │ │ ├── CanvasTweens.cs │ │ ├── CanvasTweens.cs.meta │ │ ├── GraphicTweens.cs │ │ ├── GraphicTweens.cs.meta │ │ ├── GridLayoutGroupTweens.cs │ │ ├── GridLayoutGroupTweens.cs.meta │ │ ├── HorizontalOrVerticalLayoutGroupTweens.cs │ │ ├── HorizontalOrVerticalLayoutGroupTweens.cs.meta │ │ ├── RectMask2DTweens.cs │ │ ├── RectMask2DTweens.cs.meta │ │ ├── RectTransformTweens.cs │ │ ├── RectTransformTweens.cs.meta │ │ ├── ScrollRectTweens.cs │ │ ├── ScrollRectTweens.cs.meta │ │ ├── ScrollbarTweens.cs │ │ ├── ScrollbarTweens.cs.meta │ │ ├── ShadowTweens.cs │ │ ├── ShadowTweens.cs.meta │ │ ├── SliderTweens.cs │ │ ├── SliderTweens.cs.meta │ │ ├── TextMeshTweens.cs │ │ ├── TextMeshTweens.cs.meta │ │ ├── TextTweens.cs │ │ └── TextTweens.cs.meta ├── ITweenEventHandler.cs ├── ITweenEventHandler.cs.meta ├── Interpolation.cs ├── Interpolation.cs.meta ├── LoopType.cs ├── LoopType.cs.meta ├── PropertyChaining.cs ├── PropertyChaining.cs.meta ├── Sequence.cs ├── Sequence.cs.meta ├── Settings.cs ├── Settings.cs.meta ├── Tween.cs ├── Tween.cs.meta ├── TweenFlagExtensions.cs ├── TweenFlagExtensions.cs.meta ├── TweenManager.cs ├── TweenManager.cs.meta ├── TweenState.cs ├── TweenState.cs.meta ├── TweenType.cs ├── TweenType.cs.meta ├── Tweener.cs ├── Tweener.cs.meta ├── Tweening.cs ├── Tweening.cs.meta ├── Zigurous.Tweening.asmdef └── Zigurous.Tweening.asmdef.meta ├── package.json └── package.json.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-detectable=false 2 | *.css linguist-detectable=false 3 | *.js linguist-detectable=false 4 | -------------------------------------------------------------------------------- /.github/workflows/generate-docs.yml: -------------------------------------------------------------------------------- 1 | name: Generate Docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | workflow_dispatch: 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | cancel-in-progress: true 12 | 13 | jobs: 14 | generate: 15 | name: Docs 16 | uses: zigurous/docs/.github/workflows/unity-package.yml@main 17 | with: 18 | package_title: "Tweening System" 19 | package_base_path: com.zigurous.tweening 20 | package_workflow: generate-docs.yml 21 | package_artifact: docs 22 | secrets: 23 | token: ${{ secrets.DOCS_TOKEN }} 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /**/obj/ 2 | /**/obj.meta 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | ./docs~/ 2 | .github/ 3 | .gitattributes 4 | .gitignore 5 | .gitmodules 6 | /**/obj/ 7 | /**/obj.meta 8 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | @zigurous:registry=https://npm.pkg.github.com 3 | //npm.pkg.github.com/:_authToken= 4 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 455148fdb60b6bf4c9d166e33584ffa7 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/articles/easing.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/easing" 3 | --- 4 | 5 | # Easing 6 | 7 | Easing functions specify the rate of change of a parameter over time. The website https://easings.net/ is a good resource to visualize common easing functions. 8 | 9 | Objects in real life don’t just start and stop instantly, and almost never move at a constant speed. When we open a drawer, we first move it quickly, and slow it down as it comes out. Drop something on the floor, and it will first accelerate downwards, and then bounce back up after hitting the floor. 10 | 11 |
12 | 13 | ## 〽️ Using easing functions 14 | 15 | To specify which easing function a tween uses, the property [ease](/api/Zigurous.Tweening/Tween/ease) can be set. This property is backed by a custom enum called [Ease](/api/Zigurous.Tweening/Ease) containing 30+ ease types. 16 | 17 | ```csharp 18 | tween.ease = Ease.QuadOut; 19 | ``` 20 | 21 | You can also use the easing functions directly through the static class [EaseFunction](/api/Zigurous.Tweening/EaseFunction).
22 | Every easing function takes the form f(x): 23 | 24 | ```csharp 25 | public float EaseFunction(float x); 26 | ``` 27 | 28 |
29 | 30 | ## ➰ Available Eases 31 | 32 | - Linear 33 | - SineIn 34 | - SineOut 35 | - SineInOut 36 | - CubicIn 37 | - CubicOut 38 | - CubicInOut 39 | - QuadIn 40 | - QuadOut 41 | - QuadInOut 42 | - QuartIn 43 | - QuartOut 44 | - QuartInOut 45 | - QuintIn 46 | - QuintOut 47 | - QuintInOut 48 | - ExpoIn 49 | - ExpoOut 50 | - ExpoInOut 51 | - CircIn 52 | - CircOut 53 | - CircInOut 54 | - BackIn 55 | - BackOut 56 | - BackInOut 57 | - ElasticIn 58 | - ElasticOut 59 | - ElasticInOut 60 | - BounceIn 61 | - BounceOut 62 | - BounceInOut 63 | -------------------------------------------------------------------------------- /Documentation~/articles/events.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/events" 3 | --- 4 | 5 | # Events 6 | 7 | Various events are invoked throughout the tween lifecycle. A [TweenCallback](/api/Zigurous.Tweening/TweenCallback) function delegate can be used to respond to the following events: 8 | 9 | - [onUpdate](/api/Zigurous.Tweening/Tween/onUpdate): Invoked every time the tween is updated 10 | - [onStart](/api/Zigurous.Tweening/Tween/onStart): Invoked when the tween is started 11 | - [onStop](/api/Zigurous.Tweening/Tween/onStop): Invoked when the tween is stopped 12 | - [onLoop](/api/Zigurous.Tweening/Tween/onLoop): Invoked when the tween is looped 13 | - [onComplete](/api/Zigurous.Tweening/Tween/onComplete): Invoked when the tween is completed 14 | - [onKill](/api/Zigurous.Tweening/Tween/onKill): Invoked when the tween is killed 15 | 16 |
17 | 18 | ## 🗣️ Assigning callbacks 19 | 20 | Tween callbacks can be assigned with delegates or lambdas. They have no parameters or return types. You can also use [property chaining](/manual/property-chaining) to make it easier to set multiple callbacks. 21 | 22 | ```csharp 23 | // assigning callbacks with functions 24 | tween.onUpdate += OnTweenUpdated 25 | tween.onStart += OnTweenStarted; 26 | tween.onStop += OnTweenStopped; 27 | tween.onLoop += OnTweenLooped; 28 | tween.onComplete += OnTweenCompleted; 29 | tween.onKill += OnTweenKilled; 30 | ``` 31 | 32 | ```csharp 33 | // assigning callbacks with lambdas 34 | tween.onUpdate += () => Debug.Log("Updated"); 35 | tween.onStart += () => Debug.Log("Started"); 36 | tween.onStop += () => Debug.Log("Stopped"); 37 | tween.onLoop += () => Debug.Log("Looped"); 38 | tween.onComplete += () => Debug.Log("Completed"); 39 | tween.onKill += () => Debug.Log("Killed"); 40 | ``` 41 | 42 | ```csharp 43 | // assigning callbacks with property chaining 44 | transform.TweenPosition(Vector3.zero, 1f) 45 | .OnUpdate(OnTweenUpdated) 46 | .OnStart(OnTweenStarted) 47 | .OnStop(OnTweenStopped) 48 | .OnLoop(OnTweenLooped) 49 | .OnComplete(OnTweenCompleted) 50 | .OnKill(OnTweenKilled); 51 | ``` 52 | 53 | ## 🎫 Event Handler 54 | 55 | One drawback of using delegates is that it produces GC allocations. If you are highly concerned about performance, you can use the [ITweenEventHandler](/api/Zigurous.Tweening/ITweenEventHandler) interface to avoid allocations. 56 | 57 | ```csharp 58 | public class Example : MonoBehaviour, ITweenEventHandler 59 | { 60 | private void Start() 61 | { 62 | transform.TweenPosition(Vector3.zero, 1f) 63 | .SetEventHandler(this); 64 | } 65 | 66 | public void OnTweenUpdate(Tween tween) 67 | { 68 | Debug.Log("Updated"); 69 | } 70 | 71 | public void OnTweenStart(Tween tween) 72 | { 73 | Debug.Log("Started"); 74 | } 75 | 76 | public void OnTweenStop(Tween tween) 77 | { 78 | Debug.Log("Stopped"); 79 | } 80 | 81 | public void OnTweenLoop(Tween tween) 82 | { 83 | Debug.Log("Looped"); 84 | } 85 | 86 | public void OnTweenComplete(Tween tween) 87 | { 88 | Debug.Log("Completed"); 89 | } 90 | 91 | public void OnTweenKill(Tween tween) 92 | { 93 | Debug.Log("Killed"); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Documentation~/articles/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual" 3 | --- 4 | 5 | # Tweening 6 | 7 | The **Tweening** package provides a system for tweening object properties in Unity. A tween is an animation of a value from a start position to an end position using an easing function, providing a natural sense of motion. 8 | 9 | The system is lightweight, optimized, type-safe, and memory efficient. Hundreds of predefined tweening functions can be called on many common Unity objects, or you can animate anything using generic tweening functions. Tweens can be controlled with many different control methods and various callback functions. 10 | 11 |
12 | 13 | ## Overview 14 | 15 | #### ⚙️ [Installation](/installation) 16 | 17 | #### 🧰 [Scripting API](/api/Zigurous.Tweening) 18 | 19 | #### 📋 [Changelog](/changelog) 20 | 21 | #### ⚖️ [License](/license) 22 | 23 |
24 | 25 | ## Reference 26 | 27 | #### 🚀 [Tweens](/manual/tweens) 28 | 29 | #### 🧬 [Sequences](/manual/sequences) 30 | 31 | #### 〽️ [Easing](/manual/easing) 32 | 33 | #### 🎫 [Events](/manual/events) 34 | 35 | #### ⛓️ [Property Chaining](/manual/property-chaining) 36 | 37 | #### 🏷️ [Managing Tweens](/manual/managing-tweens) 38 | 39 | #### 💠 [Supported Types](/manual/supported-types) 40 | 41 | #### 🎛️ [Settings](/manual/settings) 42 | -------------------------------------------------------------------------------- /Documentation~/articles/installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/installation" 3 | --- 4 | 5 | # Installation 6 | 7 | Use the Unity [Package Manager](https://docs.unity3d.com/Manual/upm-ui.html) to install the **Tweening** package. 8 | 9 | 1. Open the Package Manager in `Window > Package Manager` 10 | 2. Click the add (`+`) button in the status bar 11 | 3. Select `Add package from git URL` from the add menu 12 | 4. Enter the following Git URL in the text box and click Add: 13 | 14 | ```http 15 | https://github.com/zigurous/unity-tweening-system.git 16 | ``` 17 | 18 |
19 | 20 | ## 🏷️ Namespace 21 | 22 | Import the package namespace in each script or file you want to use it. You may need to regenerate project files/assemblies first. 23 | 24 | ```csharp 25 | using Zigurous.Tweening; 26 | ``` 27 | 28 |
29 | 30 | ## 💻 Source Code 31 | 32 | The source code for the **Tweening** package is in the following repository: 33 | 34 | - https://github.com/zigurous/unity-tweening-system 35 | -------------------------------------------------------------------------------- /Documentation~/articles/managing-tweens.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/managing-tweens" 3 | --- 4 | 5 | # Managing Tweens 6 | 7 | Apart from controlling the state of an individual tween, you can also manage tweens globally using the static class [Tweening](/api/Zigurous.Tweening/Tweening). This class contains functions to change the state of all managed tweens: 8 | 9 | ```csharp 10 | Tweening.PlayAll(); 11 | Tweening.StopAll(); 12 | Tweening.RestartAll(); 13 | Tweening.CompleteAll(); 14 | Tweening.KillAll(); 15 | ``` 16 | 17 | You can also get the current amount of tweens: 18 | 19 | ```csharp 20 | int count = Tweening.Count; // the number of alive tweens (not necessarily active) 21 | int activeCount = Tweening.ActiveCount; // the number of active tweens 22 | ``` 23 | 24 |
25 | 26 | ## 🏷️ Tween Ids 27 | 28 | You can also target specific tweens by id. Every tween has an `id` property which allows you to distinguish it from others. However, this is not required, nor is the id unique. The id is set automatically unless you create tweens manually using the generic approach. All ids are implement as `int` values. 29 | 30 | ```csharp 31 | Tweening.Play(id); 32 | Tweening.Stop(id); 33 | Tweening.Restart(id); 34 | Tweening.Complete(id); 35 | Tweening.Kill(id); 36 | ``` 37 | 38 | To manually set the id of a tween: 39 | 40 | ```csharp 41 | tween.id = id; 42 | ``` 43 | 44 |
45 | 46 | ## 🎯 Target References 47 | 48 | Tweens that are created using the shortcut functions will automatically set the id based on the target object being animated. For example, if you tween a transform's position, the id of the tween will get set to the hash code of the transform instance. This then allows you to find tweens using that reference object. 49 | 50 | ```csharp 51 | Tweening.Play(transform); 52 | Tweening.Stop(transform); 53 | Tweening.Restart(transform); 54 | Tweening.Complete(transform); 55 | Tweening.Kill(transform); 56 | ``` 57 | 58 | If you create tweens manually using the generic approach, you should indicate to the tween what game object or component it is referencing. This sets both the id (see above) and scene index (see below) of the tween. 59 | 60 | ```csharp 61 | tween.SetReference(gameObject); 62 | tween.SetReference(component); 63 | ``` 64 | 65 |
66 | 67 | ## 🎬 Scene Unloading 68 | 69 | Tweens will be killed automatically when the scene they are apart of is unloaded which prevents errors accessing objects that have been destroyed. However, this only works automatically if the tween knows which target object it is animating (see above). You should only need to worry about this if you are creating tweens manually using the generic approach. 70 | 71 | Make sure to kill your tweens before transitioning scenes, or set the target reference as outlined above. You can also manually set the scene index if desired. 72 | 73 | ```csharp 74 | tween.sceneIndex = SceneManager.GetActiveScene().buildIndex; 75 | ``` 76 | -------------------------------------------------------------------------------- /Documentation~/articles/property-chaining.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/property-chaining" 3 | --- 4 | 5 | # Property Chaining 6 | 7 | Property/method chaining is a technique that allows multiple properties to be assigned in a single statement without requiring a variable to store the intermediate results. This is most useful when creating new tweens. See the [PropertyChaining](/api/Zigurous.Tweening/PropertyChaining) Scripting API for a full list of properties that can be chained. 8 | 9 |
10 | 11 | ## ⛓️ Examples 12 | 13 | ```csharp 14 | // using a tween shortcut 15 | transform.TweenPosition(Vector3.zero, 1f) 16 | .SetDelay(3f) 17 | .SetReversed() 18 | .SetEase(Ease.CubicInOut) 19 | .SetLoops(-1, LoopType.PingPong) 20 | .OnLoop(() => Debug.Log("looped!")); 21 | ``` 22 | 23 | ```csharp 24 | // building from scratch 25 | Tween tween = new Tweener(transform) 26 | .SetGetter((target) => target.position) 27 | .SetSetter((target, value) => target.position = value) 28 | .SetEndValue(Vector3.zero) 29 | .SetDuration(1f) 30 | .SetEase(Ease.QuadOut) 31 | .OnComplete(() => Debug.Log("complete!")); 32 | ``` 33 | -------------------------------------------------------------------------------- /Documentation~/articles/sequences.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/sequences" 3 | --- 4 | 5 | # Sequences 6 | 7 | A [Sequence](/api/Zigurous.Tweening/Sequence) play a list of tweens in order. The sequence itself maintains its own state and can be controlled the same as any other tween (although not every property has an effect). 8 | 9 |
10 | 11 | ## 🧬 Creating a sequence 12 | 13 | Sequences can be created in one of two ways. You can simply instantiate one like any other class. However, it is recommended to create one using the static class [Tweening](/api/Zigurous.Tweening/Tweening) so it can reuse recycled sequences. 14 | 15 | ```csharp 16 | Sequence sequence = Tweening.Sequence(); // Recommended 17 | Sequence sequence = new Sequence(); // Not recommended 18 | ``` 19 | 20 |
21 | 22 | ## ➕ Adding tweens 23 | 24 | Tweens can either be added to the end or beginning of the sequence using `Append` or `Prepend`, respectively. Tweens will automatically start and stop as needed based on the state of the sequence. You should not manually transition a tween to playing or stopping (or any other state), instead change the state of the sequence. You can still customize individual tween properties, like duration, ease, callbacks, etc. 25 | 26 | ```csharp 27 | Sequence sequence = Tweening.Sequence(); 28 | 29 | // Adds a tween to the end of the sequence 30 | sequence.Append(transform.TweenPosition(Vector3.zero, 1f)); 31 | sequence.Append(transform.TweenRotation(Quaternion.identity, 1f)); 32 | 33 | // Adds a tween to the beginning of the sequence 34 | sequence.Prepend(transform.TweenScale(Vector3.one, 1f)); 35 | ``` 36 | 37 |
38 | 39 | ## 🔆 State control 40 | 41 | Sequences can be controlled the same way as any other tween, meaning you can play, stop, restart, loop, kill etc. 42 | 43 | ```csharp 44 | Sequence sequence = Tweening.Sequence(); 45 | sequence.SetLoops(-1, LoopType.PingPong); 46 | sequence.OnComplete(() => Debug.Log("success!")); 47 | sequence.Play(); 48 | ``` 49 | -------------------------------------------------------------------------------- /Documentation~/articles/settings.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/settings" 3 | --- 4 | 5 | # Settings 6 | 7 | The **Tweening** package provides global settings that can be modified. Settings can either be changed through a static class, or through a MonoBehaviour: 8 | 9 | - [defaultEase](/api/Zigurous.Tweening/Settings/defaultEase): The default [Ease](/api/Zigurous.Tweening/Ease) assigned to every tween (`Ease.QuadOut`). The ease used by a tween can be set manually if desired. 10 | - [defaultDuration](/api/Zigurous.Tweening/Settings/defaultDuration): The default amount of seconds a tween takes to complete (`0.3`). The duration of a tween can be set manually if desired. 11 | - [defaultDelay](/api/Zigurous.Tweening/Settings/defaultDelay): The default amount of seconds before every tween starts (`0`). The delay of a tween can be set manually if desired. 12 | - [overshoot](/api/Zigurous.Tweening/Settings/overshoot): The overshoot value used in easing functions (`1.70158`). 13 | - [initialCapacity](/api/Zigurous.Tweening/Settings/initialCapacity): The initial amount of tweens memory is allocated for when the system starts (`16`). Additional memory will be allocated as needed. 14 | - [autoStart](/api/Zigurous.Tweening/Settings/autoStart): Automatically starts tweens after being created (`true`). This is can be turned on/off manually per tween if desired. 15 | - [autoKill](/api/Zigurous.Tweening/Settings/autoKill): Automatically kills tweens after being completed (`true`). This is can be turned on/off manually per tween if desired. 16 | - [recyclable](/api/Zigurous.Tweening/Settings/recyclable): Keeps tweens in memory to be re-used after being killed (`true`). This can be turned on/off manually per tween if desired. 17 | 18 |
19 | 20 | ## ⚙️ Changing settings with code 21 | 22 | Settings can be changed with static properties via the [Settings](/api/Zigurous.Tweening/Settings) class.
23 | Below are all of the settings and their default values: 24 | 25 | ```csharp 26 | Settings.defaultEase = Ease.QuadOut; 27 | Settings.defaultDuration = 0.3f; 28 | Settings.defaultDelay = 0f; 29 | Settings.overshoot = 1.70158f; 30 | Settings.initialCapacity = 16; 31 | Settings.autoStart = true; 32 | Settings.autoKill = true; 33 | Settings.recyclable = true; 34 | ``` 35 | 36 |
37 | 38 | ## 🎛️ Changing settings in the editor 39 | 40 | The [Settings](/api/Zigurous.Tweening/Settings) class can also be used as a MonoBehaviour added to your scene. This is generally used to provide a simple interface for changing settings in the Unity editor rather than with code. You can, of course, still use this behavior to change settings at runtime if desired, in which case there is a function to set each respective setting. 41 | 42 | ![](../images/settings.png) 43 | -------------------------------------------------------------------------------- /Documentation~/articles/supported-types.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: "/manual/supported-types" 3 | --- 4 | 5 | # Supported Types 6 | 7 | ## ⚡ Generics 8 | 9 | When creating tweens using the generic functions, the following types of values can be animated: 10 | 11 | - `float` 12 | - `double` 13 | - `int` 14 | - `long` 15 | - `short` 16 | - `Vector2` 17 | - `Vector2Int` 18 | - `Vector3` 19 | - `Vector3Int` 20 | - `Vector4` 21 | - `Quaternion` 22 | - `Rect` 23 | - `Color` 24 | 25 |
26 | 27 | ## 💠 Shortcuts 28 | 29 | All of the following types offer shortcut functions for creating tweens: 30 | 31 | - `AimConstraint` 32 | - `AnchoredJoint2D` 33 | - `Animator` 34 | - `AreaEffector2D` 35 | - `AspectRatioFitter` 36 | - `AudioChorusFilter` 37 | - `AudioDistortionFilter` 38 | - `AudioEchoFilter` 39 | - `AudioHighPassFilter` 40 | - `AudioListener` 41 | - `AudioLowPassFilter` 42 | - `AudioReverbFilter` 43 | - `AudioReverbZone` 44 | - `AudioSource` 45 | - `BoxCollider` 46 | - `BoxCollider2D` 47 | - `BuoyancyEffector2D` 48 | - `Camera` 49 | - `Canvas` 50 | - `CanvasGroup` 51 | - `CanvasScaler` 52 | - `CapsuleCollider` 53 | - `CapsuleCollider2D` 54 | - `CharacterController` 55 | - `CharacterJoint` 56 | - `CircleCollider2D` 57 | - `Cloth` 58 | - `Collider` 59 | - `Collider2D` 60 | - `CompositeCollider2D` 61 | - `ConfigurableJoint` 62 | - `ConstantForce` 63 | - `ConstantForce2D` 64 | - `DistanceJoint2D` 65 | - `EdgeCollider2D` 66 | - `FixedJoint2D` 67 | - `FrictionJoint2D` 68 | - `Graphic` 69 | - `Grid` 70 | - `GridLayoutGroup` 71 | - `HorizontalOrVerticalLayoutGroup` 72 | - `Joint` 73 | - `Joint2D` 74 | - `LensFlare` 75 | - `Light` 76 | - `LineRenderer` 77 | - `LookAtConstraint` 78 | - `Material` 79 | - `MaterialPropertyBlock` 80 | - `NavMeshAgent` 81 | - `NavMeshObstacle` 82 | - `OcclusionArea` 83 | - `ParentConstraint` 84 | - `ParticleSystem` 85 | - `ParticleSystemForceField` 86 | - `PhysicMaterial` 87 | - `PhysicsMaterial2D` 88 | - `PlatformEffector2D` 89 | - `PointEffector2D` 90 | - `PositionConstraint` 91 | - `Projector` 92 | - `RectMask2D` 93 | - `RectOffset` 94 | - `RectTransform` 95 | - `ReflectionProbe` 96 | - `RelativeJoint2D` 97 | - `Rigidbody` 98 | - `Rigidbody2D` 99 | - `RotationConstraint` 100 | - `ScaleConstraint` 101 | - `Scrollbar` 102 | - `ScrollRect` 103 | - `Shadow` 104 | - `Slider` 105 | - `SphereCollider` 106 | - `SpringJoint` 107 | - `SpringJoint2D` 108 | - `SpriteMask` 109 | - `SpriteRenderer` 110 | - `SpriteShapeRenderer` 111 | - `SurfaceEffector2D` 112 | - `TargetJoint2D` 113 | - `Text` 114 | - `TextMesh` 115 | - `Tilemap` 116 | - `TrailRenderer` 117 | - `Transform` 118 | - `VideoPlayer` 119 | - `WheelCollider` 120 | - `WindZone` 121 | -------------------------------------------------------------------------------- /Documentation~/data/header.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Manual", 4 | "path": "/manual" 5 | }, 6 | { 7 | "name": "Scripting API", 8 | "path": "/api" 9 | }, 10 | { 11 | "name": "Changelog", 12 | "path": "/changelog" 13 | }, 14 | { 15 | "name": "License", 16 | "path": "/license" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /Documentation~/data/sidenav.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "📌 Overview", 4 | "items": [ 5 | { 6 | "name": "Getting Started", 7 | "path": "/manual" 8 | }, 9 | { 10 | "name": "Installation", 11 | "path": "/installation" 12 | }, 13 | { 14 | "name": "Changelog", 15 | "path": "/changelog" 16 | }, 17 | { 18 | "name": "License", 19 | "path": "/license" 20 | } 21 | ] 22 | }, 23 | { 24 | "title": "📖 Reference", 25 | "items": [ 26 | { 27 | "name": "Tweens", 28 | "path": "/manual/tweens" 29 | }, 30 | { 31 | "name": "Sequences", 32 | "path": "/manual/sequences" 33 | }, 34 | { 35 | "name": "Easing", 36 | "path": "/manual/easing" 37 | }, 38 | { 39 | "name": "Events", 40 | "path": "/manual/events" 41 | }, 42 | { 43 | "name": "Property Chaining", 44 | "path": "/manual/property-chaining" 45 | }, 46 | { 47 | "name": "Managing Tweens", 48 | "path": "/manual/managing-tweens" 49 | }, 50 | { 51 | "name": "Supported Types", 52 | "path": "/manual/supported-types" 53 | }, 54 | { 55 | "name": "Settings", 56 | "path": "/manual/settings" 57 | } 58 | ] 59 | }, 60 | { 61 | "title": "💬 Contact", 62 | "items": [ 63 | { 64 | "name": "Discord", 65 | "href": "https://discord.gg/DdYyWVb", 66 | "icon": "launch" 67 | }, 68 | { 69 | "name": "Twitter", 70 | "href": "https://twitter.com/zigurous", 71 | "icon": "launch" 72 | } 73 | ] 74 | }, 75 | { 76 | "title": "🔗 Other Links", 77 | "items": [ 78 | { 79 | "name": "GitHub", 80 | "href": "https://github.com/zigurous/unity-tweening-system", 81 | "icon": "launch" 82 | }, 83 | { 84 | "name": "Asset Store", 85 | "href": "https://assetstore.unity.com/publishers/51884", 86 | "icon": "launch" 87 | }, 88 | { 89 | "name": "YouTube", 90 | "href": "https://youtube.com/c/zigurous?sub_confirmation=1", 91 | "icon": "launch" 92 | }, 93 | { 94 | "name": "Patreon", 95 | "href": "https://patreon.com/zigurous", 96 | "icon": "launch" 97 | } 98 | ] 99 | } 100 | ] 101 | -------------------------------------------------------------------------------- /Documentation~/filterconfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^System 4 | - exclude: 5 | uidRegex: ^UnityEngine 6 | - exclude: 7 | uidRegex: ^UnityEditor 8 | - exclude: 9 | uidRegex: ^Zigurous.Tweening.Sequence.Animate 10 | - exclude: 11 | uidRegex: ^Zigurous.Tweening.Sequence.IsFinished 12 | - exclude: 13 | uidRegex: ^Zigurous.Tweening.Sequence.On* 14 | - exclude: 15 | uidRegex: ^Zigurous.Tweening.Tween.IsFinished 16 | - exclude: 17 | uidRegex: ^Zigurous.Tweening.Tween.On* 18 | - exclude: 19 | uidRegex: ^Zigurous.Tweening.Tweener`2.Animate 20 | - exclude: 21 | uidRegex: ^Zigurous.Tweening.Tweener`2.IsFinished 22 | - exclude: 23 | uidRegex: ^Zigurous.Tweening.Tweener`2.On* 24 | - exclude: 25 | uidRegex: ^Zigurous.Tweening.*.Tweens 26 | -------------------------------------------------------------------------------- /Documentation~/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigurous/unity-tweening-system/bc748276aa0360f9553a7d169d04bc2fa83fa5cb/Documentation~/images/settings.png -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Zigurous 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed3d61cd4abb2c9488d6fed940a3cd30 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tweening 2 | 3 | [![](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/zigurous/unity-tweening-system) [![](https://img.shields.io/github/package-json/v/zigurous/unity-tweening-system)](https://github.com/zigurous/unity-tweening-system/releases) [![](https://img.shields.io/badge/docs-link-success)](https://docs.zigurous.com/com.zigurous.tweening) [![](https://img.shields.io/github/license/zigurous/unity-tweening-system)](https://github.com/zigurous/unity-tweening-system/blob/main/LICENSE.md) 4 | 5 | The **Tweening** package provides a system for tweening object properties in Unity. A tween is an animation of a value from a start position to an end position using an easing function, providing a natural sense of motion. 6 | 7 | The system is lightweight, optimized, type-safe, and memory efficient. Hundreds of predefined tweening functions can be called on many common Unity objects, or you can animate anything using generic tweening functions. Tweens can be controlled with many different control methods and various callback functions. 8 | 9 | ## Reference 10 | 11 | - [Tweens](https://docs.zigurous.com/com.zigurous.tweening/manual/tweens) 12 | - [Sequences](https://docs.zigurous.com/com.zigurous.tweening/manual/sequences) 13 | - [Easing](https://docs.zigurous.com/com.zigurous.tweening/manual/easing) 14 | - [Events](https://docs.zigurous.com/com.zigurous.tweening/manual/events) 15 | - [Property Chaining](https://docs.zigurous.com/com.zigurous.tweening/manual/property-chaining) 16 | - [Managing Tweens](https://docs.zigurous.com/com.zigurous.tweening/manual/managing-tweens) 17 | - [Supported Types](https://docs.zigurous.com/com.zigurous.tweening/manual/supported-types) 18 | - [Settings](https://docs.zigurous.com/com.zigurous.tweening/manual/settings) 19 | 20 | ## Installation 21 | 22 | Use the Unity [Package Manager](https://docs.unity3d.com/Manual/upm-ui.html) to install the **Tweening** package. 23 | 24 | 1. Open the Package Manager in `Window > Package Manager` 25 | 2. Click the add (`+`) button in the status bar 26 | 3. Select `Add package from git URL` from the add menu 27 | 4. Enter the following Git URL in the text box and click Add: 28 | 29 | ``` 30 | https://github.com/zigurous/unity-tweening-system.git 31 | ``` 32 | 33 | ## Namespace 34 | 35 | Import the package namespace in each script or file you want to use it. You may need to regenerate project files/assemblies first. 36 | 37 | ```csharp 38 | using Zigurous.Tweening; 39 | ``` 40 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 649ca878b95f2b344a1511e33dc6cc44 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6119f08df2c11c74e9cb963849b58aee 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/ColorExtensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | /// 6 | /// Utility extension methods for colors. 7 | /// 8 | internal static class ColorExtensions 9 | { 10 | /// 11 | /// Returns a copy of the color with the red component changed. 12 | /// 13 | /// The color to change. 14 | /// The new red component. 15 | /// A copy of the color with the red component changed. 16 | public static Color WithRed(this Color color, float red) 17 | { 18 | return new Color(red, color.g, color.b, color.a); 19 | } 20 | 21 | /// 22 | /// Returns a copy of the color with the green component changed. 23 | /// 24 | /// The color to change. 25 | /// The new green component. 26 | /// A copy of the color with the green component changed. 27 | public static Color WithGreen(this Color color, float green) 28 | { 29 | return new Color(color.r, green, color.b, color.a); 30 | } 31 | 32 | /// 33 | /// Returns a copy of the color with the blue component changed. 34 | /// 35 | /// The color to change. 36 | /// The new blue component. 37 | /// A copy of the color with the blue component changed. 38 | public static Color WithBlue(this Color color, float blue) 39 | { 40 | return new Color(color.r, color.g, blue, color.a); 41 | } 42 | 43 | /// 44 | /// Returns a copy of the color with the alpha component changed. 45 | /// 46 | /// The color to change. 47 | /// The new alpha component. 48 | /// A copy of the color with the alpha component changed. 49 | public static Color WithAlpha(this Color color, float alpha) 50 | { 51 | return new Color(color.r, color.g, color.b, alpha); 52 | } 53 | 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Runtime/ColorExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 856265b6de5c23643846b48aee7d1539 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Delegates.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A function delegate that gets the current value of a parameter from an 5 | /// object. 6 | /// 7 | /// The type of object to get the parameter from. 8 | /// The type of the parameter. 9 | /// The object to get the value from. 10 | /// The current value of the parameter. 11 | public delegate U TweenGetter(T target); 12 | 13 | /// 14 | /// A function delegate that sets a new value of a parameter on an object. 15 | /// 16 | /// The type of object to set the parameter on. 17 | /// The type of the parameter. 18 | /// The object to set the value on. 19 | /// The new value of the parameter. 20 | public delegate void TweenSetter(T target, U value); 21 | 22 | /// 23 | /// A function delegate invoked during tween lifecycle events. 24 | /// 25 | public delegate void TweenCallback(); 26 | 27 | /// 28 | /// A function delegate invoked during tween lifecycle events with a 29 | /// provided reference to the tween that invoked the event. 30 | /// 31 | /// The tween that invoked the event. 32 | public delegate void TweenReferenceCallback(Tween tween); 33 | 34 | /// 35 | /// A function delegate that interpolates the value between 36 | /// and by . 37 | /// 38 | /// The type of the parameter. 39 | /// The start value. 40 | /// The end value. 41 | /// The interpolation value between the start and end value. 42 | /// Snaps the interpolated value to the nearest whole number. 43 | /// The interpolated value between the start and end value. 44 | public delegate T Interpolater(T a, T b, float t, bool snapping); 45 | } 46 | -------------------------------------------------------------------------------- /Runtime/Delegates.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b8ee13fe74131c41a6cb4e8b7b62250 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Ease.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | /// 6 | /// An easing function type. Easing functions specify the rate of change of 7 | /// a parameter over time. 8 | /// 9 | public enum Ease : int 10 | { 11 | Linear, 12 | SineIn, 13 | SineOut, 14 | SineInOut, 15 | CubicIn, 16 | CubicOut, 17 | CubicInOut, 18 | QuadIn, 19 | QuadOut, 20 | QuadInOut, 21 | QuartIn, 22 | QuartOut, 23 | QuartInOut, 24 | QuintIn, 25 | QuintOut, 26 | QuintInOut, 27 | ExpoIn, 28 | ExpoOut, 29 | ExpoInOut, 30 | CircIn, 31 | CircOut, 32 | CircInOut, 33 | BackIn, 34 | BackOut, 35 | BackInOut, 36 | ElasticIn, 37 | ElasticOut, 38 | ElasticInOut, 39 | BounceIn, 40 | BounceOut, 41 | BounceInOut 42 | } 43 | 44 | /// 45 | /// Compares the equality of two types. 46 | /// 47 | public sealed class EaseEqualityComparer : IEqualityComparer 48 | { 49 | /// 50 | /// Compares the equality of two types. 51 | /// 52 | /// The first ease to compare. 53 | /// The second ease to compare. 54 | /// True if the two ease types are equal. 55 | public bool Equals(Ease x, Ease y) => x == y; 56 | 57 | /// 58 | /// Returns the hash code for a specified type. 59 | /// 60 | /// The ease to get the hash code for. 61 | /// The hash code for the ease. 62 | public int GetHashCode(Ease ease) => (int)ease; 63 | } 64 | 65 | /// 66 | /// Extension methods for . 67 | /// 68 | public static class EaseExtensions 69 | { 70 | /// 71 | /// Returns the f(x) value using the ease function. 72 | /// 73 | /// The ease function type. 74 | /// The x-axis value to evaluate. 75 | /// The interpolated value. 76 | public static float ValueAt(this Ease ease, float x) 77 | { 78 | return EaseFunction.lookup[ease](x); 79 | } 80 | 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /Runtime/Ease.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cd64fa71526f4e49a62e1d9600ac006 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/EaseFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 993e483840565c0418f8db9435789d76 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad646951b7630ed4283893925e8baecc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26eecb2eb438e7345beb031fe600edf3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioChorusFilterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioChorusFilterTweens 6 | { 7 | public static Tween TweenDelay(this AudioChorusFilter filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.delay, (target, value) => target.delay = value, to, duration) 9 | .SetReference(filter); 10 | 11 | public static Tween TweenRate(this AudioChorusFilter filter, float to, float duration) => 12 | Tweening.To(filter, (target) => target.rate, (target, value) => target.rate = value, to, duration) 13 | .SetReference(filter); 14 | 15 | public static Tween TweenDepth(this AudioChorusFilter filter, float to, float duration) => 16 | Tweening.To(filter, (target) => target.depth, (target, value) => target.depth = value, to, duration) 17 | .SetReference(filter); 18 | 19 | public static Tween TweenDryMix(this AudioChorusFilter filter, float to, float duration) => 20 | Tweening.To(filter, (target) => target.dryMix, (target, value) => target.dryMix = value, to, duration) 21 | .SetReference(filter); 22 | 23 | public static Tween TweenWetMix1(this AudioChorusFilter filter, float to, float duration) => 24 | Tweening.To(filter, (target) => target.wetMix1, (target, value) => target.wetMix1 = value, to, duration) 25 | .SetReference(filter); 26 | 27 | public static Tween TweenWetMix2(this AudioChorusFilter filter, float to, float duration) => 28 | Tweening.To(filter, (target) => target.wetMix2, (target, value) => target.wetMix2 = value, to, duration) 29 | .SetReference(filter); 30 | 31 | public static Tween TweenWetMix3(this AudioChorusFilter filter, float to, float duration) => 32 | Tweening.To(filter, (target) => target.wetMix3, (target, value) => target.wetMix3 = value, to, duration) 33 | .SetReference(filter); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioChorusFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea599e757aeb4cf448ac0cc6e4d17d48 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioDistortionFilterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioDistortionFilterTweens 6 | { 7 | public static Tween TweenDistortionLevel(this AudioDistortionFilter filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.distortionLevel, (target, value) => target.distortionLevel = value, to, duration) 9 | .SetReference(filter); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioDistortionFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e8e81e464edbbf43b9225cb0597f508 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioEchoFilterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioEchoFilterTweens 6 | { 7 | public static Tween TweenDelay(this AudioEchoFilter filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.delay, (target, value) => target.delay = value, to, duration) 9 | .SetReference(filter); 10 | 11 | public static Tween TweenDecayRatio(this AudioEchoFilter filter, float to, float duration) => 12 | Tweening.To(filter, (target) => target.decayRatio, (target, value) => target.decayRatio = value, to, duration) 13 | .SetReference(filter); 14 | 15 | public static Tween TweenDryMix(this AudioEchoFilter filter, float to, float duration) => 16 | Tweening.To(filter, (target) => target.dryMix, (target, value) => target.dryMix = value, to, duration) 17 | .SetReference(filter); 18 | 19 | public static Tween TweenWetMix(this AudioEchoFilter filter, float to, float duration) => 20 | Tweening.To(filter, (target) => target.wetMix, (target, value) => target.wetMix = value, to, duration) 21 | .SetReference(filter); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioEchoFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8659258e9f4ad264d965052935510849 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioHighPassFilterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioHighPassFilterTweens 6 | { 7 | public static Tween TweenCutoffFrequency(this AudioHighPassFilter filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.cutoffFrequency, (target, value) => target.cutoffFrequency = value, to, duration) 9 | .SetReference(filter); 10 | 11 | public static Tween TweenHighpassResonanceQ(this AudioHighPassFilter filter, float to, float duration) => 12 | Tweening.To(filter, (target) => target.highpassResonanceQ, (target, value) => target.highpassResonanceQ = value, to, duration) 13 | .SetReference(filter); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioHighPassFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0429ac6fc857514c847bfc377e8a48d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioListenerTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioListenerTweens 6 | { 7 | public static Tween TweenVolume(this AudioListener listener, float to, float duration) => 8 | Tweening.To(listener, (source) => AudioListener.volume, (source, value) => AudioListener.volume = value, to, duration) 9 | .SetReference(listener); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioListenerTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cadeecb573ef7fb428dc661a9fa3d8ef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioLowPassFilterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioLowPassFilterTweens 6 | { 7 | public static Tween TweenCutoffFrequency(this AudioLowPassFilter filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.cutoffFrequency, (target, value) => target.cutoffFrequency = value, to, duration) 9 | .SetReference(filter); 10 | 11 | public static Tween TweenLowpassResonanceQ(this AudioLowPassFilter filter, float to, float duration) => 12 | Tweening.To(filter, (target) => target.lowpassResonanceQ, (target, value) => target.lowpassResonanceQ = value, to, duration) 13 | .SetReference(filter); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioLowPassFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7abf8b3266d1af42b8afb53aff962a2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioReverbFilterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bded118ca98404498db6383573e1189 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioReverbZoneTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioReverbZoneTweens 6 | { 7 | public static Tween TweenMaxDistance(this AudioReverbZone filter, float to, float duration) => 8 | Tweening.To(filter, (target) => target.maxDistance, (target, value) => target.maxDistance = value, to, duration) 9 | .SetReference(filter); 10 | 11 | public static Tween TweenMinDistance(this AudioReverbZone filter, float to, float duration) => 12 | Tweening.To(filter, (target) => target.minDistance, (target, value) => target.minDistance = value, to, duration) 13 | .SetReference(filter); 14 | 15 | public static Tween TweenDiffusion(this AudioReverbZone filter, float to, float duration) => 16 | Tweening.To(filter, (target) => target.diffusion, (target, value) => target.diffusion = value, to, duration) 17 | .SetReference(filter); 18 | 19 | public static Tween TweenDensity(this AudioReverbZone filter, float to, float duration) => 20 | Tweening.To(filter, (target) => target.density, (target, value) => target.density = value, to, duration) 21 | .SetReference(filter); 22 | 23 | public static Tween TweenReverbDelay(this AudioReverbZone filter, float to, float duration) => 24 | Tweening.To(filter, (target) => target.reverbDelay, (target, value) => target.reverbDelay = value, to, duration) 25 | .SetReference(filter); 26 | 27 | public static Tween TweenReflectionsDelay(this AudioReverbZone filter, float to, float duration) => 28 | Tweening.To(filter, (target) => target.reflectionsDelay, (target, value) => target.reflectionsDelay = value, to, duration) 29 | .SetReference(filter); 30 | 31 | public static Tween TweenDecayHFRatio(this AudioReverbZone filter, float to, float duration) => 32 | Tweening.To(filter, (target) => target.decayHFRatio, (target, value) => target.decayHFRatio = value, to, duration) 33 | .SetReference(filter); 34 | 35 | public static Tween TweenDecayTime(this AudioReverbZone filter, float to, float duration) => 36 | Tweening.To(filter, (target) => target.decayTime, (target, value) => target.decayTime = value, to, duration) 37 | .SetReference(filter); 38 | 39 | public static Tween TweenHFReference(this AudioReverbZone filter, float to, float duration) => 40 | Tweening.To(filter, (target) => target.HFReference, (target, value) => target.HFReference = value, to, duration) 41 | .SetReference(filter); 42 | 43 | public static Tween TweenLFReference(this AudioReverbZone filter, float to, float duration) => 44 | Tweening.To(filter, (target) => target.LFReference, (target, value) => target.LFReference = value, to, duration) 45 | .SetReference(filter); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioReverbZoneTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a227800828c3cf24aa21e7ac77d23fe4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioSourceTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AudioSourceTweens 6 | { 7 | public static Tween TweenTime(this AudioSource audioSource, float to, float duration) => 8 | Tweening.To(audioSource, (target) => target.time, (target, value) => target.time = value, to, duration) 9 | .SetReference(audioSource); 10 | 11 | public static Tween TweenPitch(this AudioSource audioSource, float to, float duration) => 12 | Tweening.To(audioSource, (target) => target.pitch, (target, value) => target.pitch = value, to, duration) 13 | .SetReference(audioSource); 14 | 15 | public static Tween TweenVolume(this AudioSource audioSource, float to, float duration) => 16 | Tweening.To(audioSource, (target) => target.volume, (target, value) => target.volume = value, to, duration) 17 | .SetReference(audioSource); 18 | 19 | public static Tween TweenPanStereo(this AudioSource audioSource, float to, float duration) => 20 | Tweening.To(audioSource, (target) => target.panStereo, (target, value) => target.panStereo = value, to, duration) 21 | .SetReference(audioSource); 22 | 23 | public static Tween TweenSpatialBlend(this AudioSource audioSource, float to, float duration) => 24 | Tweening.To(audioSource, (target) => target.spatialBlend, (target, value) => target.spatialBlend = value, to, duration) 25 | .SetReference(audioSource); 26 | 27 | public static Tween TweenReverbZoneMix(this AudioSource audioSource, float to, float duration) => 28 | Tweening.To(audioSource, (target) => target.reverbZoneMix, (target, value) => target.reverbZoneMix = value, to, duration) 29 | .SetReference(audioSource); 30 | 31 | public static Tween TweenDopplerLevel(this AudioSource audioSource, float to, float duration) => 32 | Tweening.To(audioSource, (target) => target.dopplerLevel, (target, value) => target.dopplerLevel = value, to, duration) 33 | .SetReference(audioSource); 34 | 35 | public static Tween TweenSpread(this AudioSource audioSource, float to, float duration) => 36 | Tweening.To(audioSource, (target) => target.spread, (target, value) => target.spread = value, to, duration) 37 | .SetReference(audioSource); 38 | 39 | public static Tween TweenMinDistance(this AudioSource audioSource, float to, float duration) => 40 | Tweening.To(audioSource, (target) => target.minDistance, (target, value) => target.minDistance = value, to, duration) 41 | .SetReference(audioSource); 42 | 43 | public static Tween TweenMaxDistance(this AudioSource audioSource, float to, float duration) => 44 | Tweening.To(audioSource, (target) => target.maxDistance, (target, value) => target.maxDistance = value, to, duration) 45 | .SetReference(audioSource); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Runtime/Extensions/Audio/AudioSourceTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0591cef2ebddf44c923bd446343998d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69f3b473d77bc5347892e263731ca312 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/AimConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class AimConstraintTweens 7 | { 8 | public static Tween TweenWeight(this AimConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenUpVector(this AimConstraint constraint, Vector3 to, float duration) => 13 | Tweening.To(constraint, (target) => target.upVector, (target, value) => target.upVector = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenWorldUpVector(this AimConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.worldUpVector, (target, value) => target.worldUpVector = value, to, duration) 18 | .SetReference(constraint); 19 | 20 | public static Tween TweenAimVector(this AimConstraint constraint, Vector3 to, float duration) => 21 | Tweening.To(constraint, (target) => target.aimVector, (target, value) => target.aimVector = value, to, duration) 22 | .SetReference(constraint); 23 | 24 | public static Tween TweenRotationOffset(this AimConstraint constraint, Vector3 to, float duration) => 25 | Tweening.To(constraint, (target) => target.rotationOffset, (target, value) => target.rotationOffset = value, to, duration) 26 | .SetReference(constraint); 27 | 28 | public static Tween TweenRotationAtRest(this AimConstraint constraint, Vector3 to, float duration) => 29 | Tweening.To(constraint, (target) => target.rotationAtRest, (target, value) => target.rotationAtRest = value, to, duration) 30 | .SetReference(constraint); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/AimConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7e080ec18d73ac43be38f1b8955b92b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/GridTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class GridTweens 6 | { 7 | public static Tween TweenCellSize(this Grid grid, Vector3 to, float duration) => 8 | Tweening.To(grid, (target) => target.cellSize, (target, value) => target.cellSize = value, to, duration) 9 | .SetReference(grid); 10 | 11 | public static Tween TweenCellGap(this Grid grid, Vector3 to, float duration) => 12 | Tweening.To(grid, (target) => target.cellGap, (target, value) => target.cellGap = value, to, duration) 13 | .SetReference(grid); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/GridTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 417c953d6b263fc47ba002a3c59ebca6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/LookAtConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class LookAtConstraintTweens 7 | { 8 | public static Tween TweenWeight(this LookAtConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenRoll(this LookAtConstraint constraint, float to, float duration) => 13 | Tweening.To(constraint, (target) => target.roll, (target, value) => target.roll = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenRotationOffset(this LookAtConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.rotationOffset, (target, value) => target.rotationOffset = value, to, duration) 18 | .SetReference(constraint); 19 | 20 | public static Tween TweenRotationAtRest(this LookAtConstraint constraint, Vector3 to, float duration) => 21 | Tweening.To(constraint, (target) => target.rotationAtRest, (target, value) => target.rotationAtRest = value, to, duration) 22 | .SetReference(constraint); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/LookAtConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d49e52e22380cf4d852fc2939fb4c4f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/ParentConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class ParentConstraintTweens 7 | { 8 | public static Tween TweenWeight(this ParentConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenRotationAtRest(this ParentConstraint constraint, Vector3 to, float duration) => 13 | Tweening.To(constraint, (target) => target.rotationAtRest, (target, value) => target.rotationAtRest = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenTranslationAtRest(this ParentConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.translationAtRest, (target, value) => target.translationAtRest = value, to, duration) 18 | .SetReference(constraint); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/ParentConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07242098b4101d348a129ec84f8649b7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/PositionConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class PositionConstraintTweens 7 | { 8 | public static Tween TweenWeight(this PositionConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenTranslationAtRest(this PositionConstraint constraint, Vector3 to, float duration) => 13 | Tweening.To(constraint, (target) => target.translationAtRest, (target, value) => target.translationAtRest = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenTranslationOffset(this PositionConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.translationOffset, (target, value) => target.translationOffset = value, to, duration) 18 | .SetReference(constraint); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/PositionConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba7ff6fb2cccb974994b4a08e3bc0a73 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/RectOffsetTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class RectOffsetTweens 6 | { 7 | public static Tween TweenLeft(this RectOffset offset, int to, float duration) => 8 | Tweening.To(offset, (target) => target.left, (target, value) => target.left = value, to, duration) 9 | .SetId(offset.GetHashCode()); 10 | 11 | public static Tween TweenRight(this RectOffset offset, int to, float duration) => 12 | Tweening.To(offset, (target) => target.right, (target, value) => target.right = value, to, duration) 13 | .SetId(offset.GetHashCode()); 14 | 15 | public static Tween TweenTop(this RectOffset offset, int to, float duration) => 16 | Tweening.To(offset, (target) => target.top, (target, value) => target.top = value, to, duration) 17 | .SetId(offset.GetHashCode()); 18 | 19 | public static Tween TweenBottom(this RectOffset offset, int to, float duration) => 20 | Tweening.To(offset, (target) => target.bottom, (target, value) => target.bottom = value, to, duration) 21 | .SetId(offset.GetHashCode()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/RectOffsetTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c78dad1309076894696a934dd0625320 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/RotationConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class RotationConstraintTweens 7 | { 8 | public static Tween TweenWeight(this RotationConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenRotationAtRest(this RotationConstraint constraint, Vector3 to, float duration) => 13 | Tweening.To(constraint, (target) => target.rotationAtRest, (target, value) => target.rotationAtRest = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenRotationOffset(this RotationConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.rotationOffset, (target, value) => target.rotationOffset = value, to, duration) 18 | .SetReference(constraint); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/RotationConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3dffc433c00fc324c95971ae6b097bb4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/ScaleConstraintTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Animations; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class ScaleConstraintTweens 7 | { 8 | public static Tween TweenWeight(this ScaleConstraint constraint, float to, float duration) => 9 | Tweening.To(constraint, (target) => target.weight, (target, value) => target.weight = value, to, duration) 10 | .SetReference(constraint); 11 | 12 | public static Tween TweenScaleAtRest(this ScaleConstraint constraint, Vector3 to, float duration) => 13 | Tweening.To(constraint, (target) => target.scaleAtRest, (target, value) => target.scaleAtRest = value, to, duration) 14 | .SetReference(constraint); 15 | 16 | public static Tween TweenScaleOffset(this ScaleConstraint constraint, Vector3 to, float duration) => 17 | Tweening.To(constraint, (target) => target.scaleOffset, (target, value) => target.scaleOffset = value, to, duration) 18 | .SetReference(constraint); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/ScaleConstraintTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c7769814faebb64399b12f58f513f7d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Misc/TransformTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5be9f23de9a22443b757b632af8efe1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Navigation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: edf18ef959718c7468bbf52e91069eca 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Navigation/NavMeshAgentTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.AI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class NavMeshAgentTweens 7 | { 8 | public static Tween TweenSpeed(this NavMeshAgent agent, float to, float duration) => 9 | Tweening.To(agent, (target) => target.speed, (target, value) => target.speed = value, to, duration) 10 | .SetReference(agent); 11 | 12 | public static Tween TweenAngularSpeed(this NavMeshAgent agent, float to, float duration) => 13 | Tweening.To(agent, (target) => target.angularSpeed, (target, value) => target.angularSpeed = value, to, duration) 14 | .SetReference(agent); 15 | 16 | public static Tween TweenAcceleration(this NavMeshAgent agent, float to, float duration) => 17 | Tweening.To(agent, (target) => target.acceleration, (target, value) => target.acceleration = value, to, duration) 18 | .SetReference(agent); 19 | 20 | public static Tween TweenRadius(this NavMeshAgent agent, float to, float duration) => 21 | Tweening.To(agent, (target) => target.radius, (target, value) => target.radius = value, to, duration) 22 | .SetReference(agent); 23 | 24 | public static Tween TweenHeight(this NavMeshAgent agent, float to, float duration) => 25 | Tweening.To(agent, (target) => target.height, (target, value) => target.height = value, to, duration) 26 | .SetReference(agent); 27 | 28 | public static Tween TweenBaseOffset(this NavMeshAgent agent, float to, float duration) => 29 | Tweening.To(agent, (target) => target.baseOffset, (target, value) => target.baseOffset = value, to, duration) 30 | .SetReference(agent); 31 | 32 | public static Tween TweenNextPosition(this NavMeshAgent agent, Vector3 to, float duration) => 33 | Tweening.To(agent, (target) => target.nextPosition, (target, value) => target.nextPosition = value, to, duration) 34 | .SetReference(agent); 35 | 36 | public static Tween TweenDestination(this NavMeshAgent agent, Vector3 to, float duration) => 37 | Tweening.To(agent, (target) => target.destination, (target, value) => target.destination = value, to, duration) 38 | .SetReference(agent); 39 | 40 | public static Tween TweenVelocity(this NavMeshAgent agent, Vector3 to, float duration) => 41 | Tweening.To(agent, (target) => target.velocity, (target, value) => target.velocity = value, to, duration) 42 | .SetReference(agent); 43 | 44 | public static Tween TweenStoppingDistance(this NavMeshAgent agent, float to, float duration) => 45 | Tweening.To(agent, (target) => target.stoppingDistance, (target, value) => target.stoppingDistance = value, to, duration) 46 | .SetReference(agent); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Runtime/Extensions/Navigation/NavMeshAgentTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e92abdc6e7828246bac014142159bd5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Navigation/NavMeshObstacleTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.AI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class NavMeshObstacleTweens 7 | { 8 | public static Tween TweenHeight(this NavMeshObstacle obstacle, float to, float duration) => 9 | Tweening.To(obstacle, (target) => target.height, (target, value) => target.height = value, to, duration) 10 | .SetReference(obstacle); 11 | 12 | public static Tween TweenRadius(this NavMeshObstacle obstacle, float to, float duration) => 13 | Tweening.To(obstacle, (target) => target.radius, (target, value) => target.radius = value, to, duration) 14 | .SetReference(obstacle); 15 | 16 | public static Tween TweenSize(this NavMeshObstacle obstacle, Vector3 to, float duration) => 17 | Tweening.To(obstacle, (target) => target.size, (target, value) => target.size = value, to, duration) 18 | .SetReference(obstacle); 19 | 20 | public static Tween TweenCenter(this NavMeshObstacle obstacle, Vector3 to, float duration) => 21 | Tweening.To(obstacle, (target) => target.center, (target, value) => target.center = value, to, duration) 22 | .SetReference(obstacle); 23 | 24 | public static Tween TweenVelocity(this NavMeshObstacle obstacle, Vector3 to, float duration) => 25 | Tweening.To(obstacle, (target) => target.velocity, (target, value) => target.velocity = value, to, duration) 26 | .SetReference(obstacle); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Runtime/Extensions/Navigation/NavMeshObstacleTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25576b676be8fc94ea6b25908821fe5c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c367735884151c1459f7b2d4ca569575 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/BoxColliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class BoxColliderTweens 6 | { 7 | public static Tween TweenCenter(this BoxCollider collider, Vector3 to, float duration) => 8 | Tweening.To(collider, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenSize(this BoxCollider collider, Vector3 to, float duration) => 12 | Tweening.To(collider, (target) => target.size, (target, value) => target.size = value, to, duration) 13 | .SetReference(collider); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/BoxColliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8294315225daf6345b51067a1a7196db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CapsuleColliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CapsuleColliderTweens 6 | { 7 | public static Tween TweenCenter(this CapsuleCollider collider, Vector3 to, float duration) => 8 | Tweening.To(collider, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenRadius(this CapsuleCollider collider, float to, float duration) => 12 | Tweening.To(collider, (target) => target.radius, (target, value) => target.radius = value, to, duration) 13 | .SetReference(collider); 14 | 15 | public static Tween TweenHeight(this CapsuleCollider collider, float to, float duration) => 16 | Tweening.To(collider, (target) => target.height, (target, value) => target.height = value, to, duration) 17 | .SetReference(collider); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CapsuleColliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12addd83824d9084f8aeb67beeeb1e4e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CharacterControllerTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CharacterControllerTweens 6 | { 7 | public static Tween TweenCenter(this CharacterController character, Vector3 to, float duration) => 8 | Tweening.To(character, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(character); 10 | 11 | public static Tween TweenRadius(this CharacterController character, float to, float duration) => 12 | Tweening.To(character, (target) => target.radius, (target, value) => target.radius = value, to, duration) 13 | .SetReference(character); 14 | 15 | public static Tween TweenHeight(this CharacterController character, float to, float duration) => 16 | Tweening.To(character, (target) => target.height, (target, value) => target.height = value, to, duration) 17 | .SetReference(character); 18 | 19 | public static Tween TweenSlopeLimit(this CharacterController character, float to, float duration) => 20 | Tweening.To(character, (target) => target.slopeLimit, (target, value) => target.slopeLimit = value, to, duration) 21 | .SetReference(character); 22 | 23 | public static Tween TweenStepOffset(this CharacterController character, float to, float duration) => 24 | Tweening.To(character, (target) => target.stepOffset, (target, value) => target.stepOffset = value, to, duration) 25 | .SetReference(character); 26 | 27 | public static Tween TweenSkinWidth(this CharacterController character, float to, float duration) => 28 | Tweening.To(character, (target) => target.skinWidth, (target, value) => target.skinWidth = value, to, duration) 29 | .SetReference(character); 30 | 31 | public static Tween TweenMinMoveDistance(this CharacterController character, float to, float duration) => 32 | Tweening.To(character, (target) => target.minMoveDistance, (target, value) => target.minMoveDistance = value, to, duration) 33 | .SetReference(character); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CharacterControllerTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29c61225efcc7f7459f76d481bdc0987 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CharacterJointTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CharacterJointTweens 6 | { 7 | public static Tween TweenSwingAxis(this CharacterJoint joint, Vector3 to, float duration) => 8 | Tweening.To(joint, (target) => target.swingAxis, (target, value) => target.swingAxis = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenProjectionDistance(this CharacterJoint joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.projectionDistance, (target, value) => target.projectionDistance = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenProjectionAngle(this CharacterJoint joint, float to, float duration) => 16 | Tweening.To(joint, (target) => target.projectionAngle, (target, value) => target.projectionAngle = value, to, duration) 17 | .SetReference(joint); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/CharacterJointTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38a58cabb4b3cd24eb5dc1e668165903 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ClothTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bed5989dda8654898cf0c55319ddc0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ColliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ColliderTweens 6 | { 7 | public static Tween TweenContactOffset(this Collider collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.contactOffset, (target, value) => target.contactOffset = value, to, duration) 9 | .SetReference(collider); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ColliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 978f2133659255c4b9ac1beebbb8df5e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ConfigurableJointTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ConfigurableJointTweens 6 | { 7 | public static Tween TweenProjectionAngle(this ConfigurableJoint joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.projectionAngle, (target, value) => target.projectionAngle = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenProjectionDistance(this ConfigurableJoint joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.projectionDistance, (target, value) => target.projectionDistance = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenTargetVelocity(this ConfigurableJoint joint, Vector3 to, float duration) => 16 | Tweening.To(joint, (target) => target.targetVelocity, (target, value) => target.targetVelocity = value, to, duration) 17 | .SetReference(joint); 18 | 19 | public static Tween TweenTargetAngularVelocity(this ConfigurableJoint joint, Vector3 to, float duration) => 20 | Tweening.To(joint, (target) => target.targetAngularVelocity, (target, value) => target.targetAngularVelocity = value, to, duration) 21 | .SetReference(joint); 22 | 23 | public static Tween TweenTargetPosition(this ConfigurableJoint joint, Vector3 to, float duration) => 24 | Tweening.To(joint, (target) => target.targetPosition, (target, value) => target.targetPosition = value, to, duration) 25 | .SetReference(joint); 26 | 27 | public static Tween TweenTargetRotation(this ConfigurableJoint joint, Quaternion to, float duration) => 28 | Tweening.To(joint, (target) => target.targetRotation, (target, value) => target.targetRotation = value, to, duration) 29 | .SetReference(joint); 30 | 31 | public static Tween TweenSecondaryAxis(this ConfigurableJoint joint, Vector3 to, float duration) => 32 | Tweening.To(joint, (target) => target.secondaryAxis, (target, value) => target.secondaryAxis = value, to, duration) 33 | .SetReference(joint); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ConfigurableJointTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58d19180a51f34645a600876d5b4300e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ConstantForceTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ConstantForceTweens 6 | { 7 | public static Tween TweenForce(this ConstantForce constantForce, Vector3 to, float duration) => 8 | Tweening.To(constantForce, (target) => target.force, (target, value) => target.force = value, to, duration) 9 | .SetReference(constantForce); 10 | 11 | public static Tween TweenRelativeForce(this ConstantForce constantForce, Vector3 to, float duration) => 12 | Tweening.To(constantForce, (target) => target.relativeForce, (target, value) => target.relativeForce = value, to, duration) 13 | .SetReference(constantForce); 14 | 15 | public static Tween TweenTorque(this ConstantForce constantForce, Vector3 to, float duration) => 16 | Tweening.To(constantForce, (target) => target.torque, (target, value) => target.torque = value, to, duration) 17 | .SetReference(constantForce); 18 | 19 | public static Tween TweenRelativeTorque(this ConstantForce constantForce, Vector3 to, float duration) => 20 | Tweening.To(constantForce, (target) => target.relativeTorque, (target, value) => target.relativeTorque = value, to, duration) 21 | .SetReference(constantForce); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/ConstantForceTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 440168d1a3a7d9849b8c418fd80c349f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/JointTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class JointTweens 6 | { 7 | public static Tween TweenAxis(this Joint joint, Vector3 to, float duration) => 8 | Tweening.To(joint, (target) => target.axis, (target, value) => target.axis = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenAnchor(this Joint joint, Vector3 to, float duration) => 12 | Tweening.To(joint, (target) => target.anchor, (target, value) => target.anchor = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenConnectedAnchor(this Joint joint, Vector3 to, float duration) => 16 | Tweening.To(joint, (target) => target.connectedAnchor, (target, value) => target.connectedAnchor = value, to, duration) 17 | .SetReference(joint); 18 | 19 | public static Tween TweenBreakForce(this Joint joint, float to, float duration) => 20 | Tweening.To(joint, (target) => target.breakForce, (target, value) => target.breakForce = value, to, duration) 21 | .SetReference(joint); 22 | 23 | public static Tween TweenBreakTorque(this Joint joint, float to, float duration) => 24 | Tweening.To(joint, (target) => target.breakTorque, (target, value) => target.breakTorque = value, to, duration) 25 | .SetReference(joint); 26 | 27 | public static Tween TweenMassScale(this Joint joint, float to, float duration) => 28 | Tweening.To(joint, (target) => target.massScale, (target, value) => target.massScale = value, to, duration) 29 | .SetReference(joint); 30 | 31 | public static Tween TweenConnectedMassScale(this Joint joint, float to, float duration) => 32 | Tweening.To(joint, (target) => target.connectedMassScale, (target, value) => target.connectedMassScale = value, to, duration) 33 | .SetReference(joint); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/JointTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd7448d0c51e86f49a16156f63a9f56a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/PhysicMaterialTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class PhysicMaterialTweens 6 | { 7 | public static Tween TweenBounciness(this PhysicMaterial material, float to, float duration) => 8 | Tweening.To(material, (target) => target.bounciness, (target, value) => target.bounciness = value, to, duration) 9 | .SetReference(material); 10 | 11 | public static Tween TweenDynamicFriction(this PhysicMaterial material, float to, float duration) => 12 | Tweening.To(material, (target) => target.dynamicFriction, (target, value) => target.dynamicFriction = value, to, duration) 13 | .SetReference(material); 14 | 15 | public static Tween TweenStaticFriction(this PhysicMaterial material, float to, float duration) => 16 | Tweening.To(material, (target) => target.staticFriction, (target, value) => target.staticFriction = value, to, duration) 17 | .SetReference(material); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/PhysicMaterialTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a5f0b5e55fc7564b8a79d24f9d23018 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/RigidbodyTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ea4ed3fa62655e44ab8222ced7f19b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/SphereColliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SphereColliderTweens 6 | { 7 | public static Tween TweenCenter(this SphereCollider collider, Vector3 to, float duration) => 8 | Tweening.To(collider, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenRadius(this SphereCollider collider, float to, float duration) => 12 | Tweening.To(collider, (target) => target.radius, (target, value) => target.radius = value, to, duration) 13 | .SetReference(collider); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/SphereColliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69a9c46962ed58444935ce1ad417734b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/SpringJointTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SpringJointTweens 6 | { 7 | public static Tween TweenSpring(this SpringJoint joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.spring, (target, value) => target.spring = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenDamper(this SpringJoint joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.damper, (target, value) => target.damper = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenMinDistance(this SpringJoint joint, float to, float duration) => 16 | Tweening.To(joint, (target) => target.minDistance, (target, value) => target.minDistance = value, to, duration) 17 | .SetReference(joint); 18 | 19 | public static Tween TweenMaxDistance(this SpringJoint joint, float to, float duration) => 20 | Tweening.To(joint, (target) => target.maxDistance, (target, value) => target.maxDistance = value, to, duration) 21 | .SetReference(joint); 22 | 23 | public static Tween TweenTolerance(this SpringJoint joint, float to, float duration) => 24 | Tweening.To(joint, (target) => target.tolerance, (target, value) => target.tolerance = value, to, duration) 25 | .SetReference(joint); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/SpringJointTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1114a3dbda69ed241a39090cb70a54c2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/WheelColliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class WheelColliderTweens 6 | { 7 | public static Tween TweenForceAppPointDistance(this WheelCollider collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.forceAppPointDistance, (target, value) => target.forceAppPointDistance = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenSteerAngle(this WheelCollider collider, float to, float duration) => 12 | Tweening.To(collider, (target) => target.steerAngle, (target, value) => target.steerAngle = value, to, duration) 13 | .SetReference(collider); 14 | 15 | public static Tween TweenBreakTorque(this WheelCollider collider, float to, float duration) => 16 | Tweening.To(collider, (target) => target.brakeTorque, (target, value) => target.brakeTorque = value, to, duration) 17 | .SetReference(collider); 18 | 19 | public static Tween TweenMotorTorque(this WheelCollider collider, float to, float duration) => 20 | Tweening.To(collider, (target) => target.motorTorque, (target, value) => target.motorTorque = value, to, duration) 21 | .SetReference(collider); 22 | 23 | public static Tween TweenWheelDampingRate(this WheelCollider collider, float to, float duration) => 24 | Tweening.To(collider, (target) => target.wheelDampingRate, (target, value) => target.wheelDampingRate = value, to, duration) 25 | .SetReference(collider); 26 | 27 | public static Tween TweenMass(this WheelCollider collider, float to, float duration) => 28 | Tweening.To(collider, (target) => target.mass, (target, value) => target.mass = value, to, duration) 29 | .SetReference(collider); 30 | 31 | public static Tween TweenSprungMass(this WheelCollider collider, float to, float duration) => 32 | Tweening.To(collider, (target) => target.sprungMass, (target, value) => target.sprungMass = value, to, duration) 33 | .SetReference(collider); 34 | 35 | public static Tween TweenSuspensionDistance(this WheelCollider collider, float to, float duration) => 36 | Tweening.To(collider, (target) => target.suspensionDistance, (target, value) => target.suspensionDistance = value, to, duration) 37 | .SetReference(collider); 38 | 39 | public static Tween TweenRadius(this WheelCollider collider, float to, float duration) => 40 | Tweening.To(collider, (target) => target.radius, (target, value) => target.radius = value, to, duration) 41 | .SetReference(collider); 42 | 43 | public static Tween TweenCenter(this WheelCollider collider, Vector3 to, float duration) => 44 | Tweening.To(collider, (target) => target.center, (target, value) => target.center = value, to, duration) 45 | .SetReference(collider); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics/WheelColliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c98f4391f4da32c4fa28b52a34015462 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4af5c2d4333d3304b94724dbb304188d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/AnchoredJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AnchoredJoint2DTweens 6 | { 7 | public static Tween TweenAnchor(this AnchoredJoint2D joint, Vector2 to, float duration) => 8 | Tweening.To(joint, (target) => target.anchor, (target, value) => target.anchor = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenConnectedAnchor(this AnchoredJoint2D joint, Vector2 to, float duration) => 12 | Tweening.To(joint, (target) => target.connectedAnchor, (target, value) => target.connectedAnchor = value, to, duration) 13 | .SetReference(joint); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/AnchoredJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2a6aaf2bca99484189da87caccedf89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/AreaEffector2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AreaEffector2DTweens 6 | { 7 | public static Tween TweenForceAngle(this AreaEffector2D effector, float to, float duration) => 8 | Tweening.To(effector, (target) => target.forceAngle, (target, value) => target.forceAngle = value, to, duration) 9 | .SetReference(effector); 10 | 11 | public static Tween TweenForceMagnitude(this AreaEffector2D effector, float to, float duration) => 12 | Tweening.To(effector, (target) => target.forceMagnitude, (target, value) => target.forceMagnitude = value, to, duration) 13 | .SetReference(effector); 14 | 15 | public static Tween TweenForceVariation(this AreaEffector2D effector, float to, float duration) => 16 | Tweening.To(effector, (target) => target.forceVariation, (target, value) => target.forceVariation = value, to, duration) 17 | .SetReference(effector); 18 | 19 | public static Tween TweenDrag(this AreaEffector2D effector, float to, float duration) => 20 | Tweening.To(effector, (target) => target.drag, (target, value) => target.drag = value, to, duration) 21 | .SetReference(effector); 22 | 23 | public static Tween TweenAngularDrag(this AreaEffector2D effector, float to, float duration) => 24 | Tweening.To(effector, (target) => target.angularDrag, (target, value) => target.angularDrag = value, to, duration) 25 | .SetReference(effector); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/AreaEffector2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecc435953e30609429002890ffb4c38c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/BoxCollider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class BoxCollider2DTweens 6 | { 7 | public static Tween TweenSize(this BoxCollider2D collider, Vector2 to, float duration) => 8 | Tweening.To(collider, (target) => target.size, (target, value) => target.size = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenEdgeRadius(this BoxCollider2D collider, float to, float duration) => 12 | Tweening.To(collider, (target) => target.edgeRadius, (target, value) => target.edgeRadius = value, to, duration) 13 | .SetReference(collider); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/BoxCollider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f09afe22a1920a6489eb7b239211e450 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/BuoyancyEffector2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class BuoyancyEffector2DTweens 6 | { 7 | public static Tween TweenSurfaceLevel(this BuoyancyEffector2D effector, float to, float duration) => 8 | Tweening.To(effector, (target) => target.surfaceLevel, (target, value) => target.surfaceLevel = value, to, duration) 9 | .SetReference(effector); 10 | 11 | public static Tween TweenDensity(this BuoyancyEffector2D effector, float to, float duration) => 12 | Tweening.To(effector, (target) => target.density, (target, value) => target.density = value, to, duration) 13 | .SetReference(effector); 14 | 15 | public static Tween TweenLinearDrag(this BuoyancyEffector2D effector, float to, float duration) => 16 | Tweening.To(effector, (target) => target.linearDrag, (target, value) => target.linearDrag = value, to, duration) 17 | .SetReference(effector); 18 | 19 | public static Tween TweenAngularDrag(this BuoyancyEffector2D effector, float to, float duration) => 20 | Tweening.To(effector, (target) => target.angularDrag, (target, value) => target.angularDrag = value, to, duration) 21 | .SetReference(effector); 22 | 23 | public static Tween TweenFlowAngle(this BuoyancyEffector2D effector, float to, float duration) => 24 | Tweening.To(effector, (target) => target.flowAngle, (target, value) => target.flowAngle = value, to, duration) 25 | .SetReference(effector); 26 | 27 | public static Tween TweenFlowMagnitude(this BuoyancyEffector2D effector, float to, float duration) => 28 | Tweening.To(effector, (target) => target.flowMagnitude, (target, value) => target.flowMagnitude = value, to, duration) 29 | .SetReference(effector); 30 | 31 | public static Tween TweenFlowVariation(this BuoyancyEffector2D effector, float to, float duration) => 32 | Tweening.To(effector, (target) => target.flowVariation, (target, value) => target.flowVariation = value, to, duration) 33 | .SetReference(effector); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/BuoyancyEffector2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd38c929e90d335499bdde459fa8eb47 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CapsuleCollider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CapsuleCollider2DTweens 6 | { 7 | public static Tween TweenSize(this CapsuleCollider2D collider, Vector2 to, float duration) => 8 | Tweening.To(collider, (target) => target.size, (target, value) => target.size = value, to, duration) 9 | .SetReference(collider); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CapsuleCollider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5e9ccd3b2f09904a8f91d15e9c37897 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CircleCollider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CircleCollider2DTweens 6 | { 7 | public static Tween TweenRadius(this CircleCollider2D collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.radius, (target, value) => target.radius = value, to, duration) 9 | .SetReference(collider); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CircleCollider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8d02b73943e0484ab739cfd5861a813 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Collider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class Collider2DTweens 6 | { 7 | public static Tween TweenDensity(this Collider2D collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.density, (target, value) => target.density = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenOffset(this Collider2D collider, Vector2 to, float duration) => 12 | Tweening.To(collider, (target) => target.offset, (target, value) => target.offset = value, to, duration) 13 | .SetReference(collider); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Collider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b58b7ebdce714404eb7237ad0a526b57 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CompositeCollider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CompositeCollider2DTweens 6 | { 7 | public static Tween TweenVertexDistance(this CompositeCollider2D collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.vertexDistance, (target, value) => target.vertexDistance = value, to, duration) 9 | .SetReference(collider); 10 | 11 | public static Tween TweenEdgeRadius(this CompositeCollider2D collider, float to, float duration) => 12 | Tweening.To(collider, (target) => target.edgeRadius, (target, value) => target.edgeRadius = value, to, duration) 13 | .SetReference(collider); 14 | 15 | public static Tween TweenOffsetDistance(this CompositeCollider2D collider, float to, float duration) => 16 | Tweening.To(collider, (target) => target.offsetDistance, (target, value) => target.offsetDistance = value, to, duration) 17 | .SetReference(collider); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/CompositeCollider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0753ff9d1c48c954491cce04c9354613 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/ConstantForce2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ConstantForce2DTweens 6 | { 7 | public static Tween TweenForce(this ConstantForce2D constantForce, Vector2 to, float duration) => 8 | Tweening.To(constantForce, (target) => target.force, (target, value) => target.force = value, to, duration) 9 | .SetReference(constantForce); 10 | 11 | public static Tween TweenRelativeForce(this ConstantForce2D constantForce, Vector2 to, float duration) => 12 | Tweening.To(constantForce, (target) => target.relativeForce, (target, value) => target.relativeForce = value, to, duration) 13 | .SetReference(constantForce); 14 | 15 | public static Tween TweenTorque(this ConstantForce2D constantForce, float to, float duration) => 16 | Tweening.To(constantForce, (target) => target.torque, (target, value) => target.torque = value, to, duration) 17 | .SetReference(constantForce); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/ConstantForce2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee33800dbf4192048a6db8a0e5d01f14 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/DistanceJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class DistanceJoint2DTweens 6 | { 7 | public static Tween TweenDistance(this DistanceJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.distance, (target, value) => target.distance = value, to, duration) 9 | .SetReference(joint); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/DistanceJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5754677b7e78a9744bd4efa092ea3afe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/EdgeCollider2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class EdgeCollider2DTweens 6 | { 7 | public static Tween TweenEdgeRadius(this EdgeCollider2D collider, float to, float duration) => 8 | Tweening.To(collider, (target) => target.edgeRadius, (target, value) => target.edgeRadius = value, to, duration) 9 | .SetReference(collider); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/EdgeCollider2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7262df92b4700949a912e13d653c246 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/FixedJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class FixedJoint2DTweens 6 | { 7 | public static Tween TweenDampingRatio(this FixedJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.dampingRatio, (target, value) => target.dampingRatio = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenFrequency(this FixedJoint2D joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.frequency, (target, value) => target.frequency = value, to, duration) 13 | .SetReference(joint); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/FixedJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31c1f4162fe4f34439f0f31065520574 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/FrictionJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class FrictionJoint2DTweens 6 | { 7 | public static Tween TweenMaxForce(this FrictionJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.maxForce, (target, value) => target.maxForce = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenMaxTorque(this FrictionJoint2D joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.maxTorque, (target, value) => target.maxTorque = value, to, duration) 13 | .SetReference(joint); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/FrictionJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f096782e59c213a439cf03f9237ef913 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Joint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class Joint2DTweens 6 | { 7 | public static Tween TweenBreakForce(this Joint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.breakForce, (target, value) => target.breakForce = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenBreakTorque(this Joint2D joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.breakTorque, (target, value) => target.breakTorque = value, to, duration) 13 | .SetReference(joint); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Joint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07029c97fc986204da90f46c577aba5d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PhysicsMaterial2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class PhysicsMaterial2DTweens 6 | { 7 | public static Tween TweenBounciness(this PhysicsMaterial2D material, float to, float duration) => 8 | Tweening.To(material, (target) => target.bounciness, (target, value) => target.bounciness = value, to, duration) 9 | .SetReference(material); 10 | 11 | public static Tween TweenFriction(this PhysicsMaterial2D material, float to, float duration) => 12 | Tweening.To(material, (target) => target.friction, (target, value) => target.friction = value, to, duration) 13 | .SetReference(material); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PhysicsMaterial2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 943e57e0f95bfc44ab22d31687e88319 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PlatformEffector2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class PlatformEffector2DTweens 6 | { 7 | public static Tween TweenSurfaceArc(this PlatformEffector2D effector, float to, float duration) => 8 | Tweening.To(effector, (target) => target.surfaceArc, (target, value) => target.surfaceArc = value, to, duration) 9 | .SetReference(effector); 10 | 11 | public static Tween TweenSideArc(this PlatformEffector2D effector, float to, float duration) => 12 | Tweening.To(effector, (target) => target.sideArc, (target, value) => target.sideArc = value, to, duration) 13 | .SetReference(effector); 14 | 15 | public static Tween TweenRotationalOffset(this PlatformEffector2D effector, float to, float duration) => 16 | Tweening.To(effector, (target) => target.rotationalOffset, (target, value) => target.rotationalOffset = value, to, duration) 17 | .SetReference(effector); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PlatformEffector2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 321857f5cf369ed45bb04e47aeeb32f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PointEffector2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class PointEffector2DTweens 6 | { 7 | public static Tween TweenDrag(this PointEffector2D effector, float to, float duration) => 8 | Tweening.To(effector, (target) => target.drag, (target, value) => target.drag = value, to, duration) 9 | .SetReference(effector); 10 | 11 | public static Tween TweenAngularDrag(this PointEffector2D effector, float to, float duration) => 12 | Tweening.To(effector, (target) => target.angularDrag, (target, value) => target.angularDrag = value, to, duration) 13 | .SetReference(effector); 14 | 15 | public static Tween TweenForceMagnitude(this PointEffector2D effector, float to, float duration) => 16 | Tweening.To(effector, (target) => target.forceMagnitude, (target, value) => target.forceMagnitude = value, to, duration) 17 | .SetReference(effector); 18 | 19 | public static Tween TweenForceVariation(this PointEffector2D effector, float to, float duration) => 20 | Tweening.To(effector, (target) => target.forceVariation, (target, value) => target.forceVariation = value, to, duration) 21 | .SetReference(effector); 22 | 23 | public static Tween TweenDistanceScale(this PointEffector2D effector, float to, float duration) => 24 | Tweening.To(effector, (target) => target.distanceScale, (target, value) => target.distanceScale = value, to, duration) 25 | .SetReference(effector); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/PointEffector2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 931ba14875b4a5344b18b41ca6538034 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/RelativeJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class RelativeJoint2DTweens 6 | { 7 | public static Tween TweenMaxForce(this RelativeJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.maxForce, (target, value) => target.maxForce = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenMaxTorque(this RelativeJoint2D joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.maxTorque, (target, value) => target.maxTorque = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenCorrectionScale(this RelativeJoint2D joint, float to, float duration) => 16 | Tweening.To(joint, (target) => target.correctionScale, (target, value) => target.correctionScale = value, to, duration) 17 | .SetReference(joint); 18 | 19 | public static Tween TweenLinearOffset(this RelativeJoint2D joint, Vector2 to, float duration) => 20 | Tweening.To(joint, (target) => target.linearOffset, (target, value) => target.linearOffset = value, to, duration) 21 | .SetReference(joint); 22 | 23 | public static Tween TweenAngularOffset(this RelativeJoint2D joint, float to, float duration) => 24 | Tweening.To(joint, (target) => target.angularOffset, (target, value) => target.angularOffset = value, to, duration) 25 | .SetReference(joint); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/RelativeJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f01ca2863741aa34c85ce7955fbed5aa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Rigidbody2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class Rigidbody2DTweens 6 | { 7 | public static Tween TweenPosition(this Rigidbody2D rigidbody, Vector2 to, float duration) => 8 | Tweening.To(rigidbody, (target) => target.position, (target, value) => target.position = value, to, duration) 9 | .SetReference(rigidbody); 10 | 11 | public static Tween TweenRotation(this Rigidbody2D rigidbody, float to, float duration) => 12 | Tweening.To(rigidbody, (target) => target.rotation, (target, value) => target.rotation = value, to, duration) 13 | .SetReference(rigidbody); 14 | 15 | public static Tween TweenVelocity(this Rigidbody2D rigidbody, Vector2 to, float duration) => 16 | Tweening.To(rigidbody, (target) => target.velocity, (target, value) => target.velocity = value, to, duration) 17 | .SetReference(rigidbody); 18 | 19 | public static Tween TweenAngularVelocity(this Rigidbody2D rigidbody, float to, float duration) => 20 | Tweening.To(rigidbody, (target) => target.angularVelocity, (target, value) => target.angularVelocity = value, to, duration) 21 | .SetReference(rigidbody); 22 | 23 | public static Tween TweenMass(this Rigidbody2D rigidbody, float to, float duration) => 24 | Tweening.To(rigidbody, (target) => target.mass, (target, value) => target.mass = value, to, duration) 25 | .SetReference(rigidbody); 26 | 27 | public static Tween TweenCenterOfMass(this Rigidbody2D rigidbody, Vector2 to, float duration) => 28 | Tweening.To(rigidbody, (target) => target.centerOfMass, (target, value) => target.centerOfMass = value, to, duration) 29 | .SetReference(rigidbody); 30 | 31 | public static Tween TweenDrag(this Rigidbody2D rigidbody, float to, float duration) => 32 | Tweening.To(rigidbody, (target) => target.drag, (target, value) => target.drag = value, to, duration) 33 | .SetReference(rigidbody); 34 | 35 | public static Tween TweenAngularDrag(this Rigidbody2D rigidbody, float to, float duration) => 36 | Tweening.To(rigidbody, (target) => target.angularDrag, (target, value) => target.angularDrag = value, to, duration) 37 | .SetReference(rigidbody); 38 | 39 | public static Tween TweenInertia(this Rigidbody2D rigidbody, float to, float duration) => 40 | Tweening.To(rigidbody, (target) => target.inertia, (target, value) => target.inertia = value, to, duration) 41 | .SetReference(rigidbody); 42 | 43 | public static Tween TweenGravityScale(this Rigidbody2D rigidbody, float to, float duration) => 44 | Tweening.To(rigidbody, (target) => target.gravityScale, (target, value) => target.gravityScale = value, to, duration) 45 | .SetReference(rigidbody); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/Rigidbody2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0991fe74293250545a87ea8cc97d22f5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SliderJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SliderJoint2DTweens 6 | { 7 | public static Tween TweenAngle(this SliderJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.angle, (target, value) => target.angle = value, to, duration) 9 | .SetReference(joint); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SliderJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8aa30b345533f834ca89f8d990e53783 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SpringJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SpringJoint2DTweens 6 | { 7 | public static Tween TweenDistance(this SpringJoint2D joint, float to, float duration) => 8 | Tweening.To(joint, (target) => target.distance, (target, value) => target.distance = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenDampingRatio(this SpringJoint2D joint, float to, float duration) => 12 | Tweening.To(joint, (target) => target.dampingRatio, (target, value) => target.dampingRatio = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenFrequency(this SpringJoint2D joint, float to, float duration) => 16 | Tweening.To(joint, (target) => target.frequency, (target, value) => target.frequency = value, to, duration) 17 | .SetReference(joint); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SpringJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fe0c3fee1f2e4b4097feb0e77ae1af8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SurfaceEffector2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SurfaceEffector2DTweens 6 | { 7 | public static Tween TweenSpeed(this SurfaceEffector2D effector, float to, float duration) => 8 | Tweening.To(effector, (target) => target.speed, (target, value) => target.speed = value, to, duration) 9 | .SetReference(effector); 10 | 11 | public static Tween TweenSpeedVariation(this SurfaceEffector2D effector, float to, float duration) => 12 | Tweening.To(effector, (target) => target.speedVariation, (target, value) => target.speedVariation = value, to, duration) 13 | .SetReference(effector); 14 | 15 | public static Tween TweenForceScale(this SurfaceEffector2D effector, float to, float duration) => 16 | Tweening.To(effector, (target) => target.forceScale, (target, value) => target.forceScale = value, to, duration) 17 | .SetReference(effector); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/SurfaceEffector2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdfa0b327116c3e4e99efd06252e5b15 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/TargetJoint2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class TargetJoint2DTweens 6 | { 7 | public static Tween TweenAnchor(this TargetJoint2D joint, Vector2 to, float duration) => 8 | Tweening.To(joint, (target) => target.anchor, (target, value) => target.anchor = value, to, duration) 9 | .SetReference(joint); 10 | 11 | public static Tween TweenTarget(this TargetJoint2D joint, Vector2 to, float duration) => 12 | Tweening.To(joint, (target) => target.target, (target, value) => target.target = value, to, duration) 13 | .SetReference(joint); 14 | 15 | public static Tween TweenMaxForce(this TargetJoint2D joint, float to, float duration) => 16 | Tweening.To(joint, (target) => target.maxForce, (target, value) => target.maxForce = value, to, duration) 17 | .SetReference(joint); 18 | 19 | public static Tween TweenDampingRatio(this TargetJoint2D joint, float to, float duration) => 20 | Tweening.To(joint, (target) => target.dampingRatio, (target, value) => target.dampingRatio = value, to, duration) 21 | .SetReference(joint); 22 | 23 | public static Tween TweenFrequency(this TargetJoint2D joint, float to, float duration) => 24 | Tweening.To(joint, (target) => target.frequency, (target, value) => target.frequency = value, to, duration) 25 | .SetReference(joint); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Physics2D/TargetJoint2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e0e81de50fe81b4887fc886b53e28e3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25b56c181ad46404981f8cceb6cfec6a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/AnimatorTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AnimatorTweens 6 | { 7 | public static Tween TweenSpeed(this Animator animator, float to, float duration) => 8 | Tweening.To(animator, (target) => target.speed, (target, value) => target.speed = value, to, duration) 9 | .SetReference(animator); 10 | 11 | public static Tween TweenPlaybackTime(this Animator animator, float to, float duration) => 12 | Tweening.To(animator, (target) => target.playbackTime, (target, value) => target.playbackTime = value, to, duration) 13 | .SetReference(animator); 14 | 15 | public static Tween TweenBodyRotation(this Animator animator, Quaternion to, float duration) => 16 | Tweening.To(animator, (target) => target.bodyRotation, (target, value) => target.bodyRotation = value, to, duration) 17 | .SetReference(animator); 18 | 19 | public static Tween TweenBodyPosition(this Animator animator, Vector3 to, float duration) => 20 | Tweening.To(animator, (target) => target.bodyPosition, (target, value) => target.bodyPosition = value, to, duration) 21 | .SetReference(animator); 22 | 23 | public static Tween TweenRootRotation(this Animator animator, Quaternion to, float duration) => 24 | Tweening.To(animator, (target) => target.rootRotation, (target, value) => target.rootRotation = value, to, duration) 25 | .SetReference(animator); 26 | 27 | public static Tween TweenRootPosition(this Animator animator, Vector3 to, float duration) => 28 | Tweening.To(animator, (target) => target.rootPosition, (target, value) => target.rootPosition = value, to, duration) 29 | .SetReference(animator); 30 | 31 | public static Tween TweenFeetPivotActive(this Animator animator, float to, float duration) => 32 | Tweening.To(animator, (target) => target.feetPivotActive, (target, value) => target.feetPivotActive = value, to, duration) 33 | .SetReference(animator); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/AnimatorTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e778ed849b6dfb4889bb058649c375a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/CameraTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bd87f66988b6934eae6fcccd833fd5c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LensFlareTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class LensFlareTweens 6 | { 7 | public static Tween TweenColor(this LensFlare lensFlare, Color to, float duration) => 8 | Tweening.To(lensFlare, (target) => target.color, (target, value) => target.color = value, to, duration) 9 | .SetReference(lensFlare); 10 | 11 | public static Tween TweenBrightness(this LensFlare lensFlare, float to, float duration) => 12 | Tweening.To(lensFlare, (target) => target.brightness, (target, value) => target.brightness = value, to, duration) 13 | .SetReference(lensFlare); 14 | 15 | public static Tween TweenFadeSpeed(this LensFlare lensFlare, float to, float duration) => 16 | Tweening.To(lensFlare, (target) => target.fadeSpeed, (target, value) => target.fadeSpeed = value, to, duration) 17 | .SetReference(lensFlare); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LensFlareTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27a8763d727243443bc0afb816240bd7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LightTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class LightTweens 6 | { 7 | public static Tween TweenColor(this Light light, Color to, float duration) => 8 | Tweening.To(light, (target) => target.color, (target, value) => target.color = value, to, duration) 9 | .SetReference(light); 10 | 11 | public static Tween TweenColorTemperature(this Light light, float to, float duration) => 12 | Tweening.To(light, (target) => target.colorTemperature, (target, value) => target.colorTemperature = value, to, duration) 13 | .SetReference(light); 14 | 15 | public static Tween TweenIntensity(this Light light, float to, float duration) => 16 | Tweening.To(light, (target) => target.intensity, (target, value) => target.intensity = value, to, duration) 17 | .SetReference(light); 18 | 19 | public static Tween TweenBounceIntensity(this Light light, float to, float duration) => 20 | Tweening.To(light, (target) => target.bounceIntensity, (target, value) => target.bounceIntensity = value, to, duration) 21 | .SetReference(light); 22 | 23 | public static Tween TweenRange(this Light light, float to, float duration) => 24 | Tweening.To(light, (target) => target.range, (target, value) => target.range = value, to, duration) 25 | .SetReference(light); 26 | 27 | public static Tween TweenShadowStrength(this Light light, float to, float duration) => 28 | Tweening.To(light, (target) => target.shadowStrength, (target, value) => target.shadowStrength = value, to, duration) 29 | .SetReference(light); 30 | 31 | public static Tween TweenShadowBias(this Light light, float to, float duration) => 32 | Tweening.To(light, (target) => target.shadowBias, (target, value) => target.shadowBias = value, to, duration) 33 | .SetReference(light); 34 | 35 | public static Tween TweenShadowNormalBias(this Light light, float to, float duration) => 36 | Tweening.To(light, (target) => target.shadowNormalBias, (target, value) => target.shadowNormalBias = value, to, duration) 37 | .SetReference(light); 38 | 39 | public static Tween TweenShadowNearPlane(this Light light, float to, float duration) => 40 | Tweening.To(light, (target) => target.shadowNearPlane, (target, value) => target.shadowNearPlane = value, to, duration) 41 | .SetReference(light); 42 | 43 | public static Tween TweenSpotAngle(this Light light, float to, float duration) => 44 | Tweening.To(light, (target) => target.spotAngle, (target, value) => target.spotAngle = value, to, duration) 45 | .SetReference(light); 46 | 47 | public static Tween TweenInnerSpotAngle(this Light light, float to, float duration) => 48 | Tweening.To(light, (target) => target.innerSpotAngle, (target, value) => target.innerSpotAngle = value, to, duration) 49 | .SetReference(light); 50 | 51 | public static Tween TweenCookieSize(this Light light, float to, float duration) => 52 | Tweening.To(light, (target) => target.cookieSize, (target, value) => target.cookieSize = value, to, duration) 53 | .SetReference(light); 54 | 55 | public static Tween TweenBoundingSphereOverride(this Light light, Vector4 to, float duration) => 56 | Tweening.To(light, (target) => target.boundingSphereOverride, (target, value) => target.boundingSphereOverride = value, to, duration) 57 | .SetReference(light); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LightTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 273d4addc6623904f84be33b8638f9ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LineRendererTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class LineRendererTweens 6 | { 7 | public static Tween TweenStartColor(this LineRenderer renderer, Color to, float duration) => 8 | Tweening.To(renderer, (target) => target.startColor, (target, value) => target.startColor = value, to, duration) 9 | .SetReference(renderer); 10 | 11 | public static Tween TweenEndColor(this LineRenderer renderer, Color to, float duration) => 12 | Tweening.To(renderer, (target) => target.endColor, (target, value) => target.endColor = value, to, duration) 13 | .SetReference(renderer); 14 | 15 | public static Tween TweenStartWidth(this LineRenderer renderer, float to, float duration) => 16 | Tweening.To(renderer, (target) => target.startWidth, (target, value) => target.startWidth = value, to, duration) 17 | .SetReference(renderer); 18 | 19 | public static Tween TweenEndWidth(this LineRenderer renderer, float to, float duration) => 20 | Tweening.To(renderer, (target) => target.endWidth, (target, value) => target.endWidth = value, to, duration) 21 | .SetReference(renderer); 22 | 23 | public static Tween TweenWidthMultiplier(this LineRenderer renderer, float to, float duration) => 24 | Tweening.To(renderer, (target) => target.widthMultiplier, (target, value) => target.widthMultiplier = value, to, duration) 25 | .SetReference(renderer); 26 | 27 | public static Tween TweenShadowBias(this LineRenderer renderer, float to, float duration) => 28 | Tweening.To(renderer, (target) => target.shadowBias, (target, value) => target.shadowBias = value, to, duration) 29 | .SetReference(renderer); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/LineRendererTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1428f6c7fa553e14fb920a54c7ee140d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/MaterialPropertyBlockTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb852c19ded4d96479888dab393c579e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/MaterialTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2665dac89caecd7429a33a615e788faf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/OcclusionAreaTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class OcclusionAreaTweens 6 | { 7 | public static Tween TweenCenter(this OcclusionArea area, Vector3 to, float duration) => 8 | Tweening.To(area, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(area); 10 | 11 | public static Tween TweenSize(this OcclusionArea area, Vector3 to, float duration) => 12 | Tweening.To(area, (target) => target.size, (target, value) => target.size = value, to, duration) 13 | .SetReference(area); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/OcclusionAreaTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb6b6231fc8bcb041a50628cafc89f2f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ParticleSystemForceFieldTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ParticleSystemForceFieldTweens 6 | { 7 | public static Tween TweenRotationRandomness(this ParticleSystemForceField forceField, Vector2 to, float duration) => 8 | Tweening.To(forceField, (target) => target.rotationRandomness, (target, value) => target.rotationRandomness = value, to, duration) 9 | .SetReference(forceField); 10 | 11 | public static Tween TweenGravityFocus(this ParticleSystemForceField forceField, float to, float duration) => 12 | Tweening.To(forceField, (target) => target.gravityFocus, (target, value) => target.gravityFocus = value, to, duration) 13 | .SetReference(forceField); 14 | 15 | public static Tween TweenLength(this ParticleSystemForceField forceField, float to, float duration) => 16 | Tweening.To(forceField, (target) => target.length, (target, value) => target.length = value, to, duration) 17 | .SetReference(forceField); 18 | 19 | public static Tween TweenStartRange(this ParticleSystemForceField forceField, float to, float duration) => 20 | Tweening.To(forceField, (target) => target.startRange, (target, value) => target.startRange = value, to, duration) 21 | .SetReference(forceField); 22 | 23 | public static Tween TweenEndRange(this ParticleSystemForceField forceField, float to, float duration) => 24 | Tweening.To(forceField, (target) => target.endRange, (target, value) => target.endRange = value, to, duration) 25 | .SetReference(forceField); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ParticleSystemForceFieldTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a149a625c9be6884380a62ae2c11cbd9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ParticleSystemTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ParticleSystemTweens 6 | { 7 | public static Tween TweenTime(this ParticleSystem particleSystem, float to, float duration) => 8 | Tweening.To(particleSystem, (target) => target.time, (target, value) => target.time = value, to, duration) 9 | .SetReference(particleSystem); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ParticleSystemTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3286d6dea09f234aafb911bfd753237 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ProjectorTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ProjectorTweens 6 | { 7 | public static Tween TweenNearClipPlane(this Projector projector, float to, float duration) => 8 | Tweening.To(projector, (target) => target.nearClipPlane, (target, value) => target.nearClipPlane = value, to, duration) 9 | .SetReference(projector); 10 | 11 | public static Tween TweenFarClipPlane(this Projector projector, float to, float duration) => 12 | Tweening.To(projector, (target) => target.farClipPlane, (target, value) => target.farClipPlane = value, to, duration) 13 | .SetReference(projector); 14 | 15 | public static Tween TweenFieldOfView(this Projector projector, float to, float duration) => 16 | Tweening.To(projector, (target) => target.fieldOfView, (target, value) => target.fieldOfView = value, to, duration) 17 | .SetReference(projector); 18 | 19 | public static Tween TweenAspectRatio(this Projector projector, float to, float duration) => 20 | Tweening.To(projector, (target) => target.aspectRatio, (target, value) => target.aspectRatio = value, to, duration) 21 | .SetReference(projector); 22 | 23 | public static Tween TweenOrthographicSize(this Projector projector, float to, float duration) => 24 | Tweening.To(projector, (target) => target.orthographicSize, (target, value) => target.orthographicSize = value, to, duration) 25 | .SetReference(projector); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ProjectorTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c11c17a3d0c57d4fb48fb863e415f3c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ReflectionProbeTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ReflectionProbeTweens 6 | { 7 | public static Tween TweenCenter(this ReflectionProbe probe, Vector3 to, float duration) => 8 | Tweening.To(probe, (target) => target.center, (target, value) => target.center = value, to, duration) 9 | .SetReference(probe); 10 | 11 | public static Tween TweenSize(this ReflectionProbe probe, Vector3 to, float duration) => 12 | Tweening.To(probe, (target) => target.size, (target, value) => target.size = value, to, duration) 13 | .SetReference(probe); 14 | 15 | public static Tween TweenIntensity(this ReflectionProbe probe, float to, float duration) => 16 | Tweening.To(probe, (target) => target.intensity, (target, value) => target.intensity = value, to, duration) 17 | .SetReference(probe); 18 | 19 | public static Tween TweenFarClipPlane(this ReflectionProbe probe, float to, float duration) => 20 | Tweening.To(probe, (target) => target.farClipPlane, (target, value) => target.farClipPlane = value, to, duration) 21 | .SetReference(probe); 22 | 23 | public static Tween TweenNearClipPlane(this ReflectionProbe probe, float to, float duration) => 24 | Tweening.To(probe, (target) => target.nearClipPlane, (target, value) => target.nearClipPlane = value, to, duration) 25 | .SetReference(probe); 26 | 27 | public static Tween TweenBlendDistance(this ReflectionProbe probe, float to, float duration) => 28 | Tweening.To(probe, (target) => target.blendDistance, (target, value) => target.blendDistance = value, to, duration) 29 | .SetReference(probe); 30 | 31 | public static Tween TweenShadowDistance(this ReflectionProbe probe, float to, float duration) => 32 | Tweening.To(probe, (target) => target.shadowDistance, (target, value) => target.shadowDistance = value, to, duration) 33 | .SetReference(probe); 34 | 35 | public static Tween TweenBackgroundColor(this ReflectionProbe probe, Color to, float duration) => 36 | Tweening.To(probe, (target) => target.backgroundColor, (target, value) => target.backgroundColor = value, to, duration) 37 | .SetReference(probe); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/ReflectionProbeTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4076dd4232690bb4ca8a7880d3a6c9ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteMaskTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SpriteMaskTweens 6 | { 7 | public static Tween TweenAlphaCutoff(this SpriteMask mask, float to, float duration) => 8 | Tweening.To(mask, (target) => target.alphaCutoff, (target, value) => target.alphaCutoff = value, to, duration) 9 | .SetReference(mask); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteMaskTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4797a87fdffb24e41bf873ac43cd0694 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteRendererTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SpriteRendererTweens 6 | { 7 | public static Tween TweenColor(this SpriteRenderer renderer, Color to, float duration) => 8 | Tweening.To(renderer, (target) => target.color, (target, value) => target.color = value, to, duration) 9 | .SetReference(renderer); 10 | 11 | public static Tween TweenAlpha(this SpriteRenderer renderer, float to, float duration) => 12 | Tweening.To(renderer, (target) => target.color.a, (target, value) => target.color = new Color(target.color.r, target.color.g, target.color.b, value), to, duration) 13 | .SetReference(renderer); 14 | 15 | public static Tween TweenSize(this SpriteRenderer renderer, Vector2 to, float duration) => 16 | Tweening.To(renderer, (target) => target.size, (target, value) => target.size = value, to, duration) 17 | .SetReference(renderer); 18 | 19 | public static Tween TweenAdaptiveModeThreshold(this SpriteRenderer renderer, float to, float duration) => 20 | Tweening.To(renderer, (target) => target.adaptiveModeThreshold, (target, value) => target.adaptiveModeThreshold = value, to, duration) 21 | .SetReference(renderer); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteRendererTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c2f553f626fcee4d8f39196c1c55c12 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteShapeRendererTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.U2D; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class SpriteShapeRendererTweens 7 | { 8 | public static Tween TweenColor(this SpriteShapeRenderer renderer, Color to, float duration) => 9 | Tweening.To(renderer, (target) => target.color, (target, value) => target.color = value, to, duration) 10 | .SetReference(renderer); 11 | 12 | public static Tween TweenAlpha(this SpriteShapeRenderer renderer, float to, float duration) => 13 | Tweening.To(renderer, (target) => target.color.a, (target, value) => target.color = new Color(target.color.r, target.color.g, target.color.b, value), to, duration) 14 | .SetReference(renderer); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/SpriteShapeRendererTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ab4402a33ec78a418276b8f782f978a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/TilemapTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Tilemaps; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class TilemapTweens 7 | { 8 | public static Tween TweenColor(this Tilemap tilemap, Color to, float duration) => 9 | Tweening.To(tilemap, (target) => target.color, (target, value) => target.color = value, to, duration) 10 | .SetReference(tilemap); 11 | 12 | public static Tween TweenOrigin(this Tilemap tilemap, Vector3Int to, float duration) => 13 | Tweening.To(tilemap, (target) => target.origin, (target, value) => target.origin = value, to, duration) 14 | .SetReference(tilemap); 15 | 16 | public static Tween TweenSize(this Tilemap tilemap, Vector3Int to, float duration) => 17 | Tweening.To(tilemap, (target) => target.size, (target, value) => target.size = value, to, duration) 18 | .SetReference(tilemap); 19 | 20 | public static Tween TweenTileAnchor(this Tilemap tilemap, Vector3 to, float duration) => 21 | Tweening.To(tilemap, (target) => target.tileAnchor, (target, value) => target.tileAnchor = value, to, duration) 22 | .SetReference(tilemap); 23 | 24 | public static Tween TweenAnimationFrameRate(this Tilemap tilemap, float to, float duration) => 25 | Tweening.To(tilemap, (target) => target.animationFrameRate, (target, value) => target.animationFrameRate = value, to, duration) 26 | .SetReference(tilemap); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/TilemapTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cf858f84e1de054982b3b2669e67f9e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/TrailRendererTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class TrailRendererTweens 6 | { 7 | public static Tween TweenTime(this TrailRenderer renderer, float to, float duration) => 8 | Tweening.To(renderer, (target) => target.time, (target, value) => target.time = value, to, duration) 9 | .SetReference(renderer); 10 | 11 | public static Tween TweenStartColor(this TrailRenderer renderer, Color to, float duration) => 12 | Tweening.To(renderer, (target) => target.startColor, (target, value) => target.startColor = value, to, duration) 13 | .SetReference(renderer); 14 | 15 | public static Tween TweenEndColor(this TrailRenderer renderer, Color to, float duration) => 16 | Tweening.To(renderer, (target) => target.endColor, (target, value) => target.endColor = value, to, duration) 17 | .SetReference(renderer); 18 | 19 | public static Tween TweenStartWidth(this TrailRenderer renderer, float to, float duration) => 20 | Tweening.To(renderer, (target) => target.startWidth, (target, value) => target.startWidth = value, to, duration) 21 | .SetReference(renderer); 22 | 23 | public static Tween TweenEndWidth(this TrailRenderer renderer, float to, float duration) => 24 | Tweening.To(renderer, (target) => target.endWidth, (target, value) => target.endWidth = value, to, duration) 25 | .SetReference(renderer); 26 | 27 | public static Tween TweenWidthMultiplier(this TrailRenderer renderer, float to, float duration) => 28 | Tweening.To(renderer, (target) => target.widthMultiplier, (target, value) => target.widthMultiplier = value, to, duration) 29 | .SetReference(renderer); 30 | 31 | public static Tween TweenShadowBias(this TrailRenderer renderer, float to, float duration) => 32 | Tweening.To(renderer, (target) => target.shadowBias, (target, value) => target.shadowBias = value, to, duration) 33 | .SetReference(renderer); 34 | 35 | public static Tween TweenMinVertexDistance(this TrailRenderer renderer, float to, float duration) => 36 | Tweening.To(renderer, (target) => target.minVertexDistance, (target, value) => target.minVertexDistance = value, to, duration) 37 | .SetReference(renderer); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/TrailRendererTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40f4533b8cf0da443843b4b5623e85e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/VideoPlayerTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.Video; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class VideoPlayerTweens 6 | { 7 | public static Tween TweenFrame(this VideoPlayer videoPlayer, long to, float duration) => 8 | Tweening.To(videoPlayer, (target) => target.frame, (target, value) => target.frame = value, to, duration) 9 | .SetReference(videoPlayer); 10 | 11 | public static Tween TweenTime(this VideoPlayer videoPlayer, double to, float duration) => 12 | Tweening.To(videoPlayer, (target) => target.time, (target, value) => target.time = value, to, duration) 13 | .SetReference(videoPlayer); 14 | 15 | public static Tween TweenPlaybackSpeed(this VideoPlayer videoPlayer, float to, float duration) => 16 | Tweening.To(videoPlayer, (target) => target.playbackSpeed, (target, value) => target.playbackSpeed = value, to, duration) 17 | .SetReference(videoPlayer); 18 | 19 | public static Tween TweenExternalReferenceTime(this VideoPlayer videoPlayer, double to, float duration) => 20 | Tweening.To(videoPlayer, (target) => target.externalReferenceTime, (target, value) => target.externalReferenceTime = value, to, duration) 21 | .SetReference(videoPlayer); 22 | 23 | public static Tween TweenTargetCameraAlpha(this VideoPlayer videoPlayer, float to, float duration) => 24 | Tweening.To(videoPlayer, (target) => target.targetCameraAlpha, (target, value) => target.targetCameraAlpha = value, to, duration) 25 | .SetReference(videoPlayer); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/VideoPlayerTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 969a56279a221e2409e04fde03cc8d5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/WindZoneTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class WindZoneTweens 6 | { 7 | public static Tween TweenRadius(this WindZone windZone, float to, float duration) => 8 | Tweening.To(windZone, (target) => target.radius, (target, value) => target.radius = value, to, duration) 9 | .SetReference(windZone); 10 | 11 | public static Tween TweenWindMain(this WindZone windZone, float to, float duration) => 12 | Tweening.To(windZone, (target) => target.windMain, (target, value) => target.windMain = value, to, duration) 13 | .SetReference(windZone); 14 | 15 | public static Tween TweenWindTurbulence(this WindZone windZone, float to, float duration) => 16 | Tweening.To(windZone, (target) => target.windTurbulence, (target, value) => target.windTurbulence = value, to, duration) 17 | .SetReference(windZone); 18 | 19 | public static Tween TweenWindPulseMagnitude(this WindZone windZone, float to, float duration) => 20 | Tweening.To(windZone, (target) => target.windPulseMagnitude, (target, value) => target.windPulseMagnitude = value, to, duration) 21 | .SetReference(windZone); 22 | 23 | public static Tween TweenWindPulseFrequency(this WindZone windZone, float to, float duration) => 24 | Tweening.To(windZone, (target) => target.windPulseFrequency, (target, value) => target.windPulseFrequency = value, to, duration) 25 | .SetReference(windZone); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Extensions/Rendering/WindZoneTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7432b54d03fe53249ab57a9635a41ea8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 236882b1b36510248b44b39790e65221 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/AspectRatioFitterTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class AspectRatioFitterTweens 6 | { 7 | public static Tween TweenAspectRatio(this AspectRatioFitter fitter, float to, float duration) => 8 | Tweening.To(fitter, (target) => target.aspectRatio, (target, value) => target.aspectRatio = value, to, duration) 9 | .SetReference(fitter); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/AspectRatioFitterTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d793dc4af4ca96b4cb55e8e4116050c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasGroupTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CanvasGroupTweens 6 | { 7 | public static Tween TweenAlpha(this CanvasGroup canvasGroup, float to, float duration) => 8 | Tweening.To(canvasGroup, (target) => target.alpha, (target, value) => target.alpha = value, to, duration) 9 | .SetReference(canvasGroup); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasGroupTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d1152e0e820d354bad044f138e7142c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasScalerTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class CanvasScalerTweens 7 | { 8 | public static Tween TweenScaleFactor(this CanvasScaler scaler, float to, float duration) => 9 | Tweening.To(scaler, (target) => target.scaleFactor, (target, value) => target.scaleFactor = value, to, duration) 10 | .SetReference(scaler); 11 | 12 | public static Tween TweenReferenceResolution(this CanvasScaler scaler, Vector2 to, float duration) => 13 | Tweening.To(scaler, (target) => target.referenceResolution, (target, value) => target.referenceResolution = value, to, duration) 14 | .SetReference(scaler); 15 | 16 | public static Tween TweenMatchWidthOrHeight(this CanvasScaler scaler, float to, float duration) => 17 | Tweening.To(scaler, (target) => target.matchWidthOrHeight, (target, value) => target.matchWidthOrHeight = value, to, duration) 18 | .SetReference(scaler); 19 | 20 | public static Tween TweenDefaultSpriteDPI(this CanvasScaler scaler, float to, float duration) => 21 | Tweening.To(scaler, (target) => target.defaultSpriteDPI, (target, value) => target.defaultSpriteDPI = value, to, duration) 22 | .SetReference(scaler); 23 | 24 | public static Tween TweenFallbackScreenDPI(this CanvasScaler scaler, float to, float duration) => 25 | Tweening.To(scaler, (target) => target.fallbackScreenDPI, (target, value) => target.fallbackScreenDPI = value, to, duration) 26 | .SetReference(scaler); 27 | 28 | public static Tween TweenDynamicPixelsPerUnit(this CanvasScaler scaler, float to, float duration) => 29 | Tweening.To(scaler, (target) => target.dynamicPixelsPerUnit, (target, value) => target.dynamicPixelsPerUnit = value, to, duration) 30 | .SetReference(scaler); 31 | 32 | public static Tween TweenReferencePixelsPerUnit(this CanvasScaler scaler, float to, float duration) => 33 | Tweening.To(scaler, (target) => target.referencePixelsPerUnit, (target, value) => target.referencePixelsPerUnit = value, to, duration) 34 | .SetReference(scaler); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasScalerTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3e7bdcf0b3a1924480059ba66927c73 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class CanvasTweens 6 | { 7 | public static Tween TweenScaleFactor(this Canvas canvas, float to, float duration) => 8 | Tweening.To(canvas, (target) => target.scaleFactor, (target, value) => target.scaleFactor = value, to, duration) 9 | .SetReference(canvas); 10 | 11 | public static Tween TweenPlaneDistance(this Canvas canvas, float to, float duration) => 12 | Tweening.To(canvas, (target) => target.planeDistance, (target, value) => target.planeDistance = value, to, duration) 13 | .SetReference(canvas); 14 | 15 | public static Tween TweenReferencePixelsPerUnit(this Canvas canvas, float to, float duration) => 16 | Tweening.To(canvas, (target) => target.referencePixelsPerUnit, (target, value) => target.referencePixelsPerUnit = value, to, duration) 17 | .SetReference(canvas); 18 | 19 | public static Tween TweenNormalizedSortingGridSize(this Canvas canvas, float to, float duration) => 20 | Tweening.To(canvas, (target) => target.normalizedSortingGridSize, (target, value) => target.normalizedSortingGridSize = value, to, duration) 21 | .SetReference(canvas); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/CanvasTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3f5cf3f767cdb64ca6bab9e8d50f857 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/GraphicTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class GraphicTweens 7 | { 8 | public static Tween TweenColor(this Graphic graphic, Color to, float duration) => 9 | Tweening.To(graphic, (target) => target.color, (target, value) => target.color = value, to, duration) 10 | .SetReference(graphic); 11 | 12 | public static Tween TweenAlpha(this Graphic graphic, float to, float duration) => 13 | Tweening.To(graphic, (target) => target.color.a, (target, value) => target.color = new Color(target.color.r, target.color.g, target.color.b, value), to, duration) 14 | .SetReference(graphic); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/GraphicTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e54e16670f5cdab429dbb4670195babb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/GridLayoutGroupTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class GridLayoutGroupTweens 7 | { 8 | public static Tween TweenSpacing(this GridLayoutGroup layoutGroup, Vector2 to, float duration) => 9 | Tweening.To(layoutGroup, (target) => target.spacing, (target, value) => target.spacing = value, to, duration) 10 | .SetReference(layoutGroup); 11 | 12 | public static Tween TweenCellSize(this GridLayoutGroup layoutGroup, Vector2 to, float duration) => 13 | Tweening.To(layoutGroup, (target) => target.cellSize, (target, value) => target.cellSize = value, to, duration) 14 | .SetReference(layoutGroup); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/GridLayoutGroupTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 671a8e7da73f49d40b38f8935deec047 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/HorizontalOrVerticalLayoutGroupTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class HorizontalOrVerticalLayoutGroupTweens 6 | { 7 | public static Tween TweenSpacing(this HorizontalOrVerticalLayoutGroup layoutGroup, float to, float duration) => 8 | Tweening.To(layoutGroup, (target) => target.spacing, (target, value) => target.spacing = value, to, duration) 9 | .SetReference(layoutGroup); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/HorizontalOrVerticalLayoutGroupTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d30d1997a4717c468bc91e8f7477be1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/RectMask2DTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class RectMask2DTweens 7 | { 8 | public static Tween TweenPadding(this RectMask2D mask, Vector4 to, float duration) => 9 | Tweening.To(mask, (target) => target.padding, (target, value) => target.padding = value, to, duration) 10 | .SetReference(mask); 11 | 12 | public static Tween TweenSoftness(this RectMask2D mask, Vector2Int to, float duration) => 13 | Tweening.To(mask, (target) => target.softness, (target, value) => target.softness = value, to, duration) 14 | .SetReference(mask); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/RectMask2DTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 112c33d793af04f41a80b157f9ec4282 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/RectTransformTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class RectTransformTweens 6 | { 7 | public static Tween TweenAnchoredPosition(this RectTransform transform, Vector2 to, float duration) => 8 | Tweening.To(transform, (target) => target.anchoredPosition, (target, value) => target.anchoredPosition = value, to, duration) 9 | .SetReference(transform); 10 | 11 | public static Tween TweenAnchoredPosition3D(this RectTransform transform, Vector3 to, float duration) => 12 | Tweening.To(transform, (target) => target.anchoredPosition3D, (target, value) => target.anchoredPosition3D = value, to, duration) 13 | .SetReference(transform); 14 | 15 | public static Tween TweenAnchorMin(this RectTransform transform, Vector2 to, float duration) => 16 | Tweening.To(transform, (target) => target.anchorMin, (target, value) => target.anchorMin = value, to, duration) 17 | .SetReference(transform); 18 | 19 | public static Tween TweenAnchorMax(this RectTransform transform, Vector2 to, float duration) => 20 | Tweening.To(transform, (target) => target.anchorMax, (target, value) => target.anchorMax = value, to, duration) 21 | .SetReference(transform); 22 | 23 | public static Tween TweenOffsetMin(this RectTransform transform, Vector2 to, float duration) => 24 | Tweening.To(transform, (target) => target.offsetMin, (target, value) => target.offsetMin = value, to, duration) 25 | .SetReference(transform); 26 | 27 | public static Tween TweenOffsetMax(this RectTransform transform, Vector2 to, float duration) => 28 | Tweening.To(transform, (target) => target.offsetMax, (target, value) => target.offsetMax = value, to, duration) 29 | .SetReference(transform); 30 | 31 | public static Tween TweenPivot(this RectTransform transform, Vector2 to, float duration) => 32 | Tweening.To(transform, (target) => target.pivot, (target, value) => target.pivot = value, to, duration) 33 | .SetReference(transform); 34 | 35 | public static Tween TweenSizeDelta(this RectTransform transform, Vector2 to, float duration) => 36 | Tweening.To(transform, (target) => target.sizeDelta, (target, value) => target.sizeDelta = value, to, duration) 37 | .SetReference(transform); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/RectTransformTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88e2620f0ac5f5749917c4d416efa7e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ScrollRectTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class ScrollRectTweens 7 | { 8 | public static Tween TweenElasticity(this ScrollRect scrollRect, float to, float duration) => 9 | Tweening.To(scrollRect, (target) => target.elasticity, (target, value) => target.elasticity = value, to, duration) 10 | .SetReference(scrollRect); 11 | 12 | public static Tween TweenDecelerationRate(this ScrollRect scrollRect, float to, float duration) => 13 | Tweening.To(scrollRect, (target) => target.decelerationRate, (target, value) => target.decelerationRate = value, to, duration) 14 | .SetReference(scrollRect); 15 | 16 | public static Tween TweenScrollSensitivity(this ScrollRect scrollRect, float to, float duration) => 17 | Tweening.To(scrollRect, (target) => target.scrollSensitivity, (target, value) => target.scrollSensitivity = value, to, duration) 18 | .SetReference(scrollRect); 19 | 20 | public static Tween TweenVelocity(this ScrollRect scrollRect, Vector2 to, float duration) => 21 | Tweening.To(scrollRect, (target) => target.velocity, (target, value) => target.velocity = value, to, duration) 22 | .SetReference(scrollRect); 23 | 24 | public static Tween TweenNormalizedPosition(this ScrollRect scrollRect, Vector2 to, float duration) => 25 | Tweening.To(scrollRect, (target) => target.normalizedPosition, (target, value) => target.normalizedPosition = value, to, duration) 26 | .SetReference(scrollRect); 27 | 28 | public static Tween TweenHorizontalNormalizedPosition(this ScrollRect scrollRect, float to, float duration) => 29 | Tweening.To(scrollRect, (target) => target.horizontalNormalizedPosition, (target, value) => target.horizontalNormalizedPosition = value, to, duration) 30 | .SetReference(scrollRect); 31 | 32 | public static Tween TweenVerticalNormalizedPosition(this ScrollRect scrollRect, float to, float duration) => 33 | Tweening.To(scrollRect, (target) => target.verticalNormalizedPosition, (target, value) => target.verticalNormalizedPosition = value, to, duration) 34 | .SetReference(scrollRect); 35 | 36 | public static Tween TweenHorizontalScrollbarSpacing(this ScrollRect scrollRect, float to, float duration) => 37 | Tweening.To(scrollRect, (target) => target.horizontalScrollbarSpacing, (target, value) => target.horizontalScrollbarSpacing = value, to, duration) 38 | .SetReference(scrollRect); 39 | 40 | public static Tween TweenVerticalScrollbarSpacing(this ScrollRect scrollRect, float to, float duration) => 41 | Tweening.To(scrollRect, (target) => target.verticalScrollbarSpacing, (target, value) => target.verticalScrollbarSpacing = value, to, duration) 42 | .SetReference(scrollRect); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ScrollRectTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47bfc72d01eed0e44a36eb620dead5cf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ScrollbarTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class ScrollbarTweens 6 | { 7 | public static Tween TweenValue(this Scrollbar scrollbar, float to, float duration) => 8 | Tweening.To(scrollbar, (target) => target.value, (target, value) => target.value = value, to, duration) 9 | .SetReference(scrollbar); 10 | 11 | public static Tween TweenSize(this Scrollbar scrollbar, float to, float duration) => 12 | Tweening.To(scrollbar, (target) => target.size, (target, value) => target.size = value, to, duration) 13 | .SetReference(scrollbar); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ScrollbarTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d758b309ee6f7534d8c9da1a8d91ef9a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ShadowTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Zigurous.Tweening 5 | { 6 | public static class ShadowTweens 7 | { 8 | public static Tween TweenColor(this Shadow shadow, Color to, float duration) => 9 | Tweening.To(shadow, (target) => target.effectColor, (target, value) => target.effectColor = value, to, duration) 10 | .SetReference(shadow); 11 | 12 | public static Tween TweenAlpha(this Shadow shadow, float to, float duration) => 13 | Tweening.To(shadow, (target) => target.effectColor.a, (target, value) => target.effectColor = new Color(target.effectColor.r, target.effectColor.g, target.effectColor.b, value), to, duration) 14 | .SetReference(shadow); 15 | 16 | public static Tween TweenDistance(this Shadow shadow, Vector2 to, float duration) => 17 | Tweening.To(shadow, (target) => target.effectDistance, (target, value) => target.effectDistance = value, to, duration) 18 | .SetReference(shadow); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/ShadowTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c761130d1386ce44898a9231f99273f9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/SliderTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class SliderTweens 6 | { 7 | public static Tween TweenValue(this Slider slider, float to, float duration) => 8 | Tweening.To(slider, (target) => target.value, (target, value) => target.value = value, to, duration) 9 | .SetReference(slider); 10 | 11 | public static Tween TweenNormalizedValue(this Slider slider, float to, float duration) => 12 | Tweening.To(slider, (target) => target.normalizedValue, (target, value) => target.normalizedValue = value, to, duration) 13 | .SetReference(slider); 14 | 15 | public static Tween TweenMinValue(this Slider slider, float to, float duration) => 16 | Tweening.To(slider, (target) => target.minValue, (target, value) => target.minValue = value, to, duration) 17 | .SetReference(slider); 18 | 19 | public static Tween TweenMaxValue(this Slider slider, float to, float duration) => 20 | Tweening.To(slider, (target) => target.maxValue, (target, value) => target.maxValue = value, to, duration) 21 | .SetReference(slider); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/SliderTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6dddc7ad3dce8c439c727f1576e166d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/TextMeshTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class TextMeshTweens 6 | { 7 | public static Tween TweenColor(this TextMesh textMesh, Color to, float duration) => 8 | Tweening.To(textMesh, (target) => target.color, (target, value) => target.color = value, to, duration) 9 | .SetReference(textMesh); 10 | 11 | public static Tween TweenAlpha(this TextMesh textMesh, float to, float duration) => 12 | Tweening.To(textMesh, (target) => target.color.a, (target, value) => target.color = new Color(target.color.r, target.color.g, target.color.b, value), to, duration) 13 | .SetReference(textMesh); 14 | 15 | public static Tween TweenFontSize(this TextMesh textMesh, int to, float duration) => 16 | Tweening.To(textMesh, (target) => target.fontSize, (target, value) => target.fontSize = value, to, duration) 17 | .SetReference(textMesh); 18 | 19 | public static Tween TweenOffsetZ(this TextMesh textMesh, float to, float duration) => 20 | Tweening.To(textMesh, (target) => target.offsetZ, (target, value) => target.offsetZ = value, to, duration) 21 | .SetReference(textMesh); 22 | 23 | public static Tween TweenCharacterSize(this TextMesh textMesh, float to, float duration) => 24 | Tweening.To(textMesh, (target) => target.characterSize, (target, value) => target.characterSize = value, to, duration) 25 | .SetReference(textMesh); 26 | 27 | public static Tween TweenLineSpacing(this TextMesh textMesh, float to, float duration) => 28 | Tweening.To(textMesh, (target) => target.lineSpacing, (target, value) => target.lineSpacing = value, to, duration) 29 | .SetReference(textMesh); 30 | 31 | public static Tween TweenTabSize(this TextMesh textMesh, float to, float duration) => 32 | Tweening.To(textMesh, (target) => target.tabSize, (target, value) => target.tabSize = value, to, duration) 33 | .SetReference(textMesh); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/TextMeshTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26a1ba19ac01fb74d9e576949af9a65b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/TextTweens.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | 3 | namespace Zigurous.Tweening 4 | { 5 | public static class TextTweens 6 | { 7 | public static Tween TweenFontSize(this Text text, int to, float duration) => 8 | Tweening.To(text, (target) => target.fontSize, (target, value) => target.fontSize = value, to, duration) 9 | .SetReference(text); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/Extensions/UI/TextTweens.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fddd9551de16528428834252631c4da2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/ITweenEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A type that responds to tween lifecycle events. 5 | /// 6 | public interface ITweenEventHandler 7 | { 8 | /// 9 | /// An event invoked every time the tween is updated, i.e., any time the 10 | /// parameter being animated is changed. 11 | /// 12 | /// The tween that invoked the event. 13 | void OnTweenUpdate(Tween tween); 14 | 15 | /// 16 | /// An event invoked when the tween is started. 17 | /// 18 | /// The tween that invoked the event. 19 | void OnTweenStart(Tween tween); 20 | 21 | /// 22 | /// An event invoked when the tween is stopped. 23 | /// 24 | /// The tween that invoked the event. 25 | void OnTweenStop(Tween tween); 26 | 27 | /// 28 | /// An event invoked when the tween is looped. 29 | /// 30 | /// The tween that invoked the event. 31 | void OnTweenLoop(Tween tween); 32 | 33 | /// 34 | /// An event invoked when the tween is completed. 35 | /// 36 | /// The tween that invoked the event. 37 | void OnTweenComplete(Tween tween); 38 | 39 | /// 40 | /// An event invoked when the tween is killed. 41 | /// 42 | /// The tween that invoked the event. 43 | void OnTweenKill(Tween tween); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Runtime/ITweenEventHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 023846bfd8af34743afd4f4f27045458 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Interpolation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df0b9c14a82e9324999bf8a66f78590f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/LoopType.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A type of loop style. 5 | /// 6 | public enum LoopType 7 | { 8 | /// 9 | /// Restarts the tween from the beginning after it ends. 10 | /// 11 | Restart, 12 | 13 | /// 14 | /// Restarts the tween from the beginning after it ends. If the tween 15 | /// has a delay it will be delayed again each loop. 16 | /// 17 | RestartWithDelay, 18 | 19 | /// 20 | /// Plays the tween forwards then backwards then forwards then 21 | /// backwards, etc. 22 | /// 23 | PingPong, 24 | 25 | /// 26 | /// Plays the tween forwards then backwards then forwards then 27 | /// backwards, etc. If the tween has a delay it will be delayed again 28 | /// each loop. 29 | /// 30 | PingPongWithDelay, 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Runtime/LoopType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0e91685e746cb9498123e461f4ee68a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/PropertyChaining.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbc08029352c377448c0cb6d6d9d5eb1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Sequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4b9fdefb49fff14a82de17b8428daa3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Settings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 227af5bdeacb88f4985d7044a036e0ba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Tween.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17698d32d34fc294389bb250bb6c3453 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/TweenFlagExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// Extension methods for . 5 | /// 6 | internal static class TweenFlagExtensions 7 | { 8 | /// 9 | /// Checks if the flags contains a specified flag. 10 | /// 11 | /// The flags to check. 12 | /// The other flag to check for. 13 | public static bool Has(this Tween.Flag flags, Tween.Flag other) { 14 | return ((int)flags & (int)other) == (int)other; 15 | } 16 | 17 | /// 18 | /// Checks if the flags contains any of the other specified flags. 19 | /// 20 | /// The flags to check. 21 | /// The other flags to check for. 22 | public static bool HasAny(this Tween.Flag flags, Tween.Flag other) { 23 | return ((int)flags & (int)other) != 0; 24 | } 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/TweenFlagExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 932cda7153f6d5b49bf1cd7948591dce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/TweenManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a611932655fbc4747b45d02a652b7939 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/TweenState.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A type of animation state that a tween can be in. 5 | /// 6 | public enum TweenState 7 | { 8 | /// 9 | /// The tween has been initialized and is ready to be played. 10 | /// 11 | Ready, 12 | 13 | /// 14 | /// The tween is currently playing and receiving updates. 15 | /// 16 | Playing, 17 | 18 | /// 19 | /// The tween is currently stopped/paused. 20 | /// 21 | Stopped, 22 | 23 | /// 24 | /// The tween has completed but not yet killed. 25 | /// 26 | Complete, 27 | 28 | /// 29 | /// The tween is killed, making it no longer usable. 30 | /// 31 | Killed 32 | } 33 | 34 | /// 35 | /// A type of state that a tween can be in as it relates to the lifecycle 36 | /// and management of the tween. 37 | /// 38 | internal enum InternalTweenState 39 | { 40 | /// 41 | /// The tween is waiting to be marked as active. 42 | /// 43 | Queued, 44 | 45 | /// 46 | /// The tween is currently active and receiving updates. 47 | /// 48 | Active, 49 | 50 | /// 51 | /// The tween is waiting to be recycled or killed. 52 | /// 53 | Dequeued, 54 | 55 | /// 56 | /// The tween is inactive but stays in memory to be re-used. 57 | /// 58 | Recycled, 59 | 60 | /// 61 | /// The tween is inactive and can no longer be used. 62 | /// 63 | Killed 64 | } 65 | 66 | /// 67 | /// Extension methods for . 68 | /// 69 | internal static class TweenStateExtensions 70 | { 71 | /// 72 | /// Determines if the current state can transition to a new state. 73 | /// 74 | /// The current state. 75 | /// The state to transition to. 76 | /// Ture if the current state can transition to the new state. 77 | internal static bool CanTransition(this TweenState state, TweenState transition) 78 | { 79 | // Cannot transition to self 80 | if (state == transition) { 81 | return false; 82 | } 83 | 84 | // Killed tweens cannot make any state changes 85 | if (state == TweenState.Killed) { 86 | return false; 87 | } 88 | 89 | // Cannot transition to Ready state, reserved internally 90 | if (transition == TweenState.Ready) { 91 | return false; 92 | } 93 | 94 | // Determine state-specific transitions 95 | switch (transition) 96 | { 97 | case TweenState.Stopped: 98 | return state == TweenState.Playing; 99 | 100 | default: 101 | return true; 102 | } 103 | } 104 | 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /Runtime/TweenState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab32c43e3a4ae7e4ca77467469b069b6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/TweenType.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A type of tween, used internally for managing and recycling tweens. 5 | /// 6 | internal enum TweenType 7 | { 8 | Tweener, 9 | Sequence, 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/TweenType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: feb68a77fc8b27a4395f99b83ac49a2b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Tweener.cs: -------------------------------------------------------------------------------- 1 | namespace Zigurous.Tweening 2 | { 3 | /// 4 | /// A tween that animates a parameter over time on an object from a start 5 | /// value to an end value. 6 | /// 7 | /// The type of object to tween. 8 | /// The type of parameter to tween. 9 | public class Tweener : Tween 10 | { 11 | /// 12 | /// The object being tweened. 13 | /// 14 | public T target; 15 | 16 | /// 17 | /// The function that gets the current value of the parameter being 18 | /// tweened. 19 | /// 20 | public TweenGetter getter; 21 | 22 | /// 23 | /// The function that sets a new value of the parameter being tweened. 24 | /// 25 | public TweenSetter setter; 26 | 27 | /// 28 | /// The function that interpolates values between the tween's start and 29 | /// end value. 30 | /// 31 | public Interpolater interpolater; 32 | 33 | /// 34 | /// The initial value of the parameter at the start of the tween. 35 | /// 36 | public U startValue; 37 | 38 | /// 39 | /// The desired value of the parameter at the end of the tween. 40 | /// 41 | public U endValue; 42 | 43 | /// 44 | /// Creates a new tweener. 45 | /// 46 | public Tweener() : base() 47 | { 48 | type = TweenType.Tweener; 49 | template = typeof(Tweener); 50 | } 51 | 52 | /// 53 | /// Creates a new tweener with the specified target object. 54 | /// 55 | /// The object to tween. 56 | public Tweener(T target) : this() 57 | { 58 | this.SetTarget(target); 59 | } 60 | 61 | /// 62 | public override void Animate() 63 | { 64 | if (interpolater == null || setter == null) { 65 | return; 66 | } 67 | 68 | float percent = PercentComplete; 69 | 70 | if (reversed) { 71 | percent = 1f - percent; 72 | } 73 | 74 | float time = EaseFunction.lookup[ease](percent); 75 | setter(target, interpolater(startValue, endValue, time, snapping)); 76 | } 77 | 78 | /// 79 | protected override void OnStart() 80 | { 81 | if (Iterations == 0 && getter != null) { 82 | startValue = getter(target); 83 | } 84 | } 85 | 86 | /// 87 | protected override void OnKill() 88 | { 89 | target = default(T); 90 | interpolater = null; 91 | getter = null; 92 | setter = null; 93 | } 94 | 95 | /// 96 | protected override void OnReset() 97 | { 98 | target = default(T); 99 | interpolater = null; 100 | getter = null; 101 | setter = null; 102 | } 103 | 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /Runtime/Tweener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80a83b32e4404914cb61109ecdd0bfbd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Tweening.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7023eb6dc0a37bb4b8cc14c269d67b93 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Zigurous.Tweening.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Zigurous.Tweening", 3 | "references": [], 4 | "includePlatforms": [], 5 | "excludePlatforms": [], 6 | "allowUnsafeCode": false, 7 | "overrideReferences": false, 8 | "precompiledReferences": [], 9 | "autoReferenced": true, 10 | "defineConstraints": [], 11 | "versionDefines": [], 12 | "noEngineReferences": false 13 | } 14 | -------------------------------------------------------------------------------- /Runtime/Zigurous.Tweening.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2d21db32495a854fb22c01ac224c003 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.zigurous.tweening", 3 | "version": "3.0.0", 4 | "displayName": "Tweening", 5 | "description": "The Tweening package provides a system for tweening object properties in Unity. A tween is an animation of a value from a start position to an end position using an easing function, providing a natural sense of motion.\n\nThe system is lightweight, optimized, type-safe, and memory efficient. Hundreds of predefined tweening functions can be called on many common Unity classes, or you can animate anything using generic tweening functions. Tweens can be controlled with many different control methods and various callback functions.", 6 | "unity": "2019.4", 7 | "repository": "https://github.com/zigurous/unity-tweening-system", 8 | "documentationUrl": "https://docs.zigurous.com/com.zigurous.tweening", 9 | "changelogUrl": "https://docs.zigurous.com/com.zigurous.tweening/changelog", 10 | "licensesUrl": "https://docs.zigurous.com/com.zigurous.tweening/license", 11 | "keywords": [ 12 | "tweening", 13 | "tweens", 14 | "animation", 15 | "system", 16 | "motion", 17 | "easing", 18 | "curves" 19 | ], 20 | "publishConfig": { 21 | "registry": "https://npm.pkg.github.com/@zigurous" 22 | }, 23 | "author": { 24 | "name": "Zigurous", 25 | "email": "support@zigurous.com", 26 | "url": "https://zigurous.com" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbd8188d6e0c0db49b82d23805019b26 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------