From fc6de82e75310b4c007d80753a5f58e6692f4855 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 13 Oct 2020 10:33:05 +0800 Subject: +misc --- Assets/ThirdParty/Demigiant/DOTween/DOTween.XML | 4414 ++++++++++---------- Assets/ThirdParty/Demigiant/DOTween/DOTween43.xml | 128 +- Assets/ThirdParty/Demigiant/DOTween/DOTween46.xml | 370 +- Assets/ThirdParty/Demigiant/DOTween/DOTween50.xml | 206 +- .../Demigiant/DOTween/Editor/DOTweenEditor.XML | 130 +- Assets/ThirdParty/Demigiant/DOTween/readme.txt | 34 +- .../Demigiant/DOTweenPro/DOTweenAnimation.cs | 962 ++--- .../ThirdParty/Demigiant/DOTweenPro/DOTweenPro.XML | 142 +- .../DOTweenPro/DOTweenTextMeshPro.cs.addon | 476 +-- .../Demigiant/DOTweenPro/DOTweenTk2d.cs.addon | 284 +- .../DOTweenPro/Editor/DOTweenAnimationInspector.cs | 904 ++-- .../DOTweenPro/Editor/DOTweenProEditor.XML | 36 +- Assets/ThirdParty/Demigiant/DOTweenPro/readme.txt | 48 +- Assets/ThirdParty/Demigiant/DemiLib/DemiLib.xml | 72 +- .../Demigiant/DemiLib/Editor/DemiEditor.XML | 620 +-- Assets/ThirdParty/Demigiant/readme_DOTweenPro.txt | 46 +- 16 files changed, 4436 insertions(+), 4436 deletions(-) (limited to 'Assets/ThirdParty/Demigiant') diff --git a/Assets/ThirdParty/Demigiant/DOTween/DOTween.XML b/Assets/ThirdParty/Demigiant/DOTween/DOTween.XML index dfd017bc..74ae353b 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/DOTween.XML +++ b/Assets/ThirdParty/Demigiant/DOTween/DOTween.XML @@ -1,2207 +1,2207 @@ - - - - DOTween - - - - - Update type - - - - Updates every frame during Update calls - - - Updates every frame during LateUpdate calls - - - Updates using FixedUpdate calls - - - - Path mode (used to determine correct LookAt orientation) - - - - Ignores the path mode (and thus LookAt behaviour) - - - Regular 3D path - - - 2D top-down path - - - 2D side-scroller path - - - - Used internally - - - - - This class serves only as a utility class to store tween settings to apply on multiple tweens. - It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining - - - - A variable you can eventually Clear and reuse when needed, - to avoid instantiating TweenParams objects - - - Creates a new TweenParams object, which you can use to store tween settings - to pass to multiple tweens via myTween.SetAs(myTweenParms) - - - Clears and resets this TweenParams instance using default values, - so it can be reused without instantiating another one - - - Sets the autoKill behaviour of the tween. - Has no effect if the tween has already started - If TRUE the tween will be automatically killed when complete - - - Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. - The ID to assign to this tween. Can be an int, a string, an object or anything else. - - - Sets the target for the tween, which can then be used as a filter with DOTween's static methods. - IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. - When using shorcuts the shortcut target is already assigned as the tween's target, - so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. - The target to assign to this tween. Can be an int, a string, an object or anything else. - - - Sets the looping options for the tween. - Has no effect if the tween has already started - Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) - Loop behaviour type (default: LoopType.Restart) - - - Sets the ease of the tween. - If applied to Sequences eases the whole sequence animation - Eventual overshoot or amplitude to use with Back or Elastic easeType (default is 1.70158) - Eventual period to use with Elastic easeType (default is 0) - - - Sets the ease of the tween using an AnimationCurve. - If applied to Sequences eases the whole sequence animation - - - Sets the ease of the tween using a custom ease function. - If applied to Sequences eases the whole sequence animation - - - Sets the recycling behaviour for the tween. - If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. - - - Sets the update type to the one defined in DOTween.defaultUpdateType (UpdateType.Normal unless changed) - and lets you choose if it should be independent from Unity's Time.timeScale - If TRUE the tween will ignore Unity's Time.timeScale - - - Sets the type of update (default or independent) for the tween - The type of update (default: UpdateType.Normal) - If TRUE the tween will ignore Unity's Time.timeScale - - - Sets the onStart callback for the tween. - Called the first time the tween is set in a playing state, after any eventual delay - - - Sets the onPlay callback for the tween. - Called when the tween is set in a playing state, after any eventual delay. - Also called each time the tween resumes playing from a paused state - - - Sets the onRewind callback for the tween. - Called when the tween is rewinded, - either by calling Rewind or by reaching the start position while playing backwards. - Rewinding a tween that is already rewinded will not fire this callback - - - Sets the onUpdate callback for the tween. - Called each time the tween updates - - - Sets the onStepComplete callback for the tween. - Called the moment the tween completes one loop cycle, even when going backwards - - - Sets the onComplete callback for the tween. - Called the moment the tween reaches its final forward position, loops included - - - Sets the onKill callback for the tween. - Called the moment the tween is killed - - - Sets the onWaypointChange callback for the tween. - Called when a path tween reaches a new waypoint - - - Sets a delayed startup for the tween. - Has no effect on Sequences or if the tween has already started - - - If isRelative is TRUE sets the tween as relative - (the endValue will be calculated as startValue + endValue instead than being used directly). - Has no effect on Sequences or if the tween has already started - - - If isSpeedBased is TRUE sets the tween as speed based - (the duration will represent the number of units the tween moves x second). - Has no effect on Sequences, nested tweens, or if the tween has already started - - - - Used to separate DOTween class from the MonoBehaviour instance (in order to use static constructors on DOTween). - Contains all instance-based methods - - - - - Used to allow method chaining with DOTween.Init - - - - - Directly sets the current max capacity of Tweeners and Sequences - (meaning how many Tweeners and Sequences can be running at the same time), - so that DOTween doesn't need to automatically increase them in case the max is reached - (which might lead to hiccups when that happens). - Sequences capacity must be less or equal to Tweeners capacity - (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). - Beware: use this method only when there are no tweens running. - - Max Tweeners capacity. - Default: 200 - Max Sequences capacity. - Default: 50 - - - Used internally inside Unity Editor, as a trick to update DOTween's inspector at every frame - - - - Directly sets the current max capacity of Tweeners and Sequences - (meaning how many Tweeners and Sequences can be running at the same time), - so that DOTween doesn't need to automatically increase them in case the max is reached - (which might lead to hiccups when that happens). - Sequences capacity must be less or equal to Tweeners capacity - (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). - Beware: use this method only when there are no tweens running. - - Max Tweeners capacity. - Default: 200 - Max Sequences capacity. - Default: 50 - - - - Public so it can be used by lose scripts related to DOTween (like DOTweenAnimation) - - - - - Controls other tweens as a group - - - - - Indicates either a Tweener or a Sequence - - - - Called the first time the tween is set in a playing state, after any eventual delay - - - TimeScale for the tween - - - If TRUE the tween wil go backwards - - - Id (usable for filtering with DOTween static methods). Can be an int, a string, an object, or anything else - - - Tween target (usable for filtering with DOTween static methods). Automatically set by tween creation shorcuts - - - Called when the tween is set in a playing state, after any eventual delay. - Also called each time the tween resumes playing from a paused state - - - Called when the tween state changes from playing to paused. - If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. - - - Called when the tween is rewinded, - either by calling Rewind or by reaching the start position while playing backwards. - Rewinding a tween that is already rewinded will not fire this callback - - - Called each time the tween updates - - - Called the moment the tween completes one loop cycle - - - Called the moment the tween reaches completion (loops included) - - - Called the moment the tween is killed - - - Called when a path tween's current waypoint changes - - - Gets and sets the time position (loops included, delays excluded) of the tween - - - - Rotation mode used with DORotate methods - - - - - Fastest way that never rotates beyond 360° - - - - - Fastest way that rotates beyond 360° - - - - - Adds the given rotation to the transform using world axis and an advanced precision mode - (like when using transform.Rotate(Space.World)). - In this mode the end value is is always considered relative - - - - - Adds the given rotation to the transform's local axis - (like when rotating an object with the "local" switch enabled in Unity's editor or using transform.Rotate(Space.Self)). - In this mode the end value is is always considered relative - - - - - This plugin generates some GC allocations at startup - - - - - Don't assign this! It's assigned automatically when creating 0 duration tweens - - - - - Don't assign this! It's assigned automatically when setting the ease to an AnimationCurve or to a custom ease function - - - - - Types of log behaviours - - - - Log only warnings and errors - - - Log warnings, errors and additional infos - - - Log only errors - - - - Methods that extend Tween objects and allow to set their parameters - - - - Sets the autoKill behaviour of the tween. - Has no effect if the tween has already started - - - Sets the autoKill behaviour of the tween. - Has no effect if the tween has already started - If TRUE the tween will be automatically killed when complete - - - Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. - The ID to assign to this tween. Can be an int, a string, an object or anything else. - - - Sets the target for the tween, which can then be used as a filter with DOTween's static methods. - IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. - When using shorcuts the shortcut target is already assigned as the tween's target, - so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. - The target to assign to this tween. Can be an int, a string, an object or anything else. - - - Sets the looping options for the tween. - Has no effect if the tween has already started - Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) - - - Sets the looping options for the tween. - Has no effect if the tween has already started - Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) - Loop behaviour type (default: LoopType.Restart) - - - Sets the ease of the tween. - If applied to Sequences eases the whole sequence animation - - - Sets the ease of the tween. - If applied to Sequences eases the whole sequence animation - Eventual overshoot to use with Back ease (default is 1.70158) - - - Sets the ease of the tween. - If applied to Sequences eases the whole sequence animation - Eventual amplitude to use with Elastic easeType (default is 1.70158) - Eventual period to use with Elastic easeType (default is 0) - - - Sets the ease of the tween using an AnimationCurve. - If applied to Sequences eases the whole sequence animation - - - Sets the ease of the tween using a custom ease function (which must return a value between 0 and 1). - If applied to Sequences eases the whole sequence animation - - - Allows the tween to be recycled after being killed. - - - Sets the recycling behaviour for the tween. - If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. - - - Sets the update type to UpdateType.Normal and lets you choose if it should be independent from Unity's Time.timeScale - If TRUE the tween will ignore Unity's Time.timeScale - - - Sets the type of update for the tween - The type of update (defalt: UpdateType.Normal) - - - Sets the type of update for the tween and lets you choose if it should be independent from Unity's Time.timeScale - The type of update - If TRUE the tween will ignore Unity's Time.timeScale - - - Sets the onStart callback for the tween. - Called the first time the tween is set in a playing state, after any eventual delay - - - Sets the onPlay callback for the tween. - Called when the tween is set in a playing state, after any eventual delay. - Also called each time the tween resumes playing from a paused state - - - Sets the onPlay callback for the tween. - Called when the tween state changes from playing to paused. - If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. - - - Sets the onRewind callback for the tween. - Called when the tween is rewinded, - either by calling Rewind or by reaching the start position while playing backwards. - Rewinding a tween that is already rewinded will not fire this callback - - - Sets the onUpdate callback for the tween. - Called each time the tween updates - - - Sets the onStepComplete callback for the tween. - Called the moment the tween completes one loop cycle, even when going backwards - - - Sets the onComplete callback for the tween. - Called the moment the tween reaches its final forward position, loops included - - - Sets the onKill callback for the tween. - Called the moment the tween is killed - - - Sets the onWaypointChange callback for the tween. - Called when a path tween's current waypoint changes - - - Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given one. - Doesn't copy specific SetOptions settings: those will need to be applied manually each time. - Has no effect if the tween has already started. - NOTE: the tween's target will not be changed - Tween from which to copy the parameters - - - Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given TweenParams. - Has no effect if the tween has already started. - TweenParams from which to copy the parameters - - - Adds the given tween to the end of the Sequence. - Has no effect if the Sequence has already started - The tween to append - - - Adds the given tween to the beginning of the Sequence, pushing forward the other nested content. - Has no effect if the Sequence has already started - The tween to prepend - - - Inserts the given tween at the same time position of the last tween added to the Sequence. - Has no effect if the Sequence has already started - - - Inserts the given tween at the given time position in the Sequence, - automatically adding an interval if needed. - Has no effect if the Sequence has already started - The time position where the tween will be placed - The tween to insert - - - Adds the given interval to the end of the Sequence. - Has no effect if the Sequence has already started - The interval duration - - - Adds the given interval to the beginning of the Sequence, pushing forward the other nested content. - Has no effect if the Sequence has already started - The interval duration - - - Adds the given callback to the end of the Sequence. - Has no effect if the Sequence has already started - The callback to append - - - Adds the given callback to the beginning of the Sequence, pushing forward the other nested content. - Has no effect if the Sequence has already started - The callback to prepend - - - Inserts the given callback at the given time position in the Sequence, - automatically adding an interval if needed. - Has no effect if the Sequence has already started - The time position where the callback will be placed - The callback to insert - - - Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue - then immediately sends the target to the previously set endValue. - - - Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue - then immediately sends the target to the previously set endValue. - If TRUE the FROM value will be calculated as relative to the current one - - - Sets a delayed startup for the tween. - Has no effect on Sequences or if the tween has already started - - - Sets the tween as relative - (the endValue will be calculated as startValue + endValue instead than being used directly). - Has no effect on Sequences or if the tween has already started - - - If isRelative is TRUE sets the tween as relative - (the endValue will be calculated as startValue + endValue instead than being used directly). - Has no effect on Sequences or if the tween has already started - - - If isSpeedBased is TRUE sets the tween as speed based - (the duration will represent the number of units the tween moves x second). - Has no effect on Sequences, nested tweens, or if the tween has already started - - - If isSpeedBased is TRUE sets the tween as speed based - (the duration will represent the number of units the tween moves x second). - Has no effect on Sequences, nested tweens, or if the tween has already started - - - Options for float tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector2 tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector2 tweens - Selecting an axis will tween the vector only on that axis, leaving the others untouched - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector3 tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector3 tweens - Selecting an axis will tween the vector only on that axis, leaving the others untouched - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector4 tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector4 tweens - Selecting an axis will tween the vector only on that axis, leaving the others untouched - If TRUE the tween will smoothly snap all values to integers - - - Options for Quaternion tweens - If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°. - If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative - - - Options for Color tweens - If TRUE only the alpha value of the color will be tweened - - - Options for Vector4 tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector4 tweens - If TRUE, rich text will be interpreted correctly while animated, - otherwise all tags will be considered as normal text - The type of scramble to use, if any - A string containing the characters to use for scrambling. - Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. - Leave it to NULL to use default ones - - - Options for Vector3Array tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Vector3Array tweens - If TRUE the tween will smoothly snap all values to integers - - - Options for Path tweens (created via the DOPath shortcut) - The eventual movement axis to lock. You can input multiple axis if you separate them like this: - AxisConstrain.X | AxisConstraint.Y - The eventual rotation axis to lock. You can input multiple axis if you separate them like this: - AxisConstrain.X | AxisConstraint.Y - - - Options for Path tweens (created via the DOPath shortcut) - If TRUE the path will be automatically closed - The eventual movement axis to lock. You can input multiple axis if you separate them like this: - AxisConstrain.X | AxisConstraint.Y - The eventual rotation axis to lock. You can input multiple axis if you separate them like this: - AxisConstrain.X | AxisConstraint.Y - - - Additional LookAt options for Path tweens (created via the DOPath shortcut). - Orients the target towards the given position. - Must be chained directly to the tween creation method or to a SetOptions - The position to look at - The eventual direction to consider as "forward". - If left to NULL defaults to the regular forward side of the transform - The vector that defines in which direction up is (default: Vector3.up) - - - Additional LookAt options for Path tweens (created via the DOPath shortcut). - Orients the target towards another transform. - Must be chained directly to the tween creation method or to a SetOptions - The transform to look at - The eventual direction to consider as "forward". - If left to NULL defaults to the regular forward side of the transform - The vector that defines in which direction up is (default: Vector3.up) - - - Additional LookAt options for Path tweens (created via the DOPath shortcut). - Orients the target to the path, with the given lookAhead. - Must be chained directly to the tween creation method or to a SetOptions - The percentage of lookAhead to use (0 to 1) - The eventual direction to consider as "forward". - If left to NULL defaults to the regular forward side of the transform - The vector that defines in which direction up is (default: Vector3.up) - - - - Methods that extend Tween objects and allow to control or get data from them - - - - Completes the tween - - - Flips the direction of this tween (backwards if it was going forward or viceversa) - - - Forces the tween to initialize its settings immediately - - - Send the tween to the given position in time - Time position to reach - (if higher than the whole tween duration the tween will simply reach its end) - If TRUE will play the tween after reaching the given position, otherwise it will pause it - - - Kills the tween - If TRUE completes the tween before killing it - - - Pauses the tween - - - Plays the tween - - - Sets the tween in a backwards direction and plays it - - - Sets the tween in a forward direction and plays it - - - Restarts the tween from the beginning - If TRUE includes the eventual tween delay, otherwise skips it - - - Rewinds the tween - If TRUE includes the eventual tween delay, otherwise skips it - - - Plays the tween if it was paused, pauses it if it was playing - - - Send a path tween to the given waypoint. - Has no effect if this is not a path tween. - BEWARE, this is a special utility method: - it works only with Linear eases. Also, the lookAt direction might be wrong after calling this and might need to be set manually - (because it relies on a smooth path movement and doesn't work well with jumps that encompass dramatic direction changes) - Waypoint index to reach - (if higher than the max waypoint index the tween will simply go to the last one) - If TRUE will play the tween after reaching the given waypoint, otherwise it will pause it - - - - Creates a yield instruction that waits until the tween is killed or complete. - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForCompletion(); - - - - - Creates a yield instruction that waits until the tween is killed or rewinded. - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForRewind(); - - - - - Creates a yield instruction that waits until the tween is killed. - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForKill(); - - - - - Creates a yield instruction that waits until the tween is killed or has gone through the given amount of loops. - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForElapsedLoops(2); - - Elapsed loops to wait for - - - - Creates a yield instruction that waits until the tween is killed or has reached the given position (loops included, delays excluded). - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForPosition(2.5f); - - Position (loops included, delays excluded) to wait for - - - - Creates a yield instruction that waits until the tween is killed or started - (meaning when the tween is set in a playing state the first time, after any eventual delay). - It can be used inside a coroutine as a yield. - Example usage:yield return myTween.WaitForStart(); - - - - Returns the total number of loops completed by this tween - - - Returns the eventual delay set for this tween - - - Returns the duration of this tween (delays excluded). - NOTE: when using settings like SpeedBased, the duration will be recalculated when the tween starts - If TRUE returns the full duration loops included, - otherwise the duration of a single loop cycle - - - Returns the elapsed time for this tween (delays exluded) - If TRUE returns the elapsed time since startup loops included, - otherwise the elapsed time within the current loop cycle - - - Returns the elapsed percentage (0 to 1) of this tween (delays exluded) - If TRUE returns the elapsed percentage since startup loops included, - otherwise the elapsed percentage within the current loop cycle - - - Returns the elapsed percentage (0 to 1) of this tween (delays exluded), - based on a single loop, and calculating eventual backwards Yoyo loops as 1 to 0 instead of 0 to 1 - - - Returns FALSE if this tween has been killed. - BEWARE: if this tween is recyclable it might have been spawned again for another use and thus return TRUE anyway. - When working with recyclable tweens you should take care to know when a tween has been killed and manually set your references to NULL. - If you want to be sure your references are set to NULL when a tween is killed you can use the OnKill callback like this: - .OnKill(()=> myTweenReference = null) - - - Returns TRUE if this tween was reversed and is set to go backwards - - - Returns TRUE if the tween is complete - (silently fails and returns FALSE if the tween has been killed) - - - Returns TRUE if this tween has been initialized - - - Returns TRUE if this tween is playing - - - - Returns a point on a path based on the given path percentage - (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized) - A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). - You can force a path to be initialized by calling myTween.ForceInit(). - - Percentage of the path (0 to 1) on which to get the point - - - - Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized). - A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). - You can force a path to be initialized by calling myTween.ForceInit(). - - - - - Used for tween callbacks - - - - - Used for tween callbacks - - - - - Used for custom and animationCurve-based ease functions. Must return a value between 0 and 1. - - - - - Used in place of System.Func, which is not available in mscorlib. - - - - - Used in place of System.Action. - - - - - Types of autoPlay behaviours - - - - No tween is automatically played - - - Only Sequences are automatically played - - - Only Tweeners are automatically played - - - All tweens are automatically played - - - - Methods that extend known Unity objects and allow to directly create and control tweens from their instances - - - - Tweens an AudioSource's volume to the given value. - Also stores the AudioSource as the tween's target so it can be used for filtered operations - The end value to reach (0 to 1)The duration of the tween - - - Tweens an AudioSource's pitch to the given value. - Also stores the AudioSource as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's aspect to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's backgroundColor to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's farClipPlane to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's fieldOfView to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's nearClipPlane to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's orthographicSize to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's pixelRect to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Camera's rect to the given value. - Also stores the camera as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Shakes a Camera's localPosition along its relative X Y axes with the given values. - Also stores the camera as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Camera's localPosition along its relative X Y axes with the given values. - Also stores the camera as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Camera's localRotation. - Also stores the camera as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Camera's localRotation. - Also stores the camera as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Tweens a Light's color to the given value. - Also stores the light as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Light's intensity to the given value. - Also stores the light as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Light's shadowStrength to the given value. - Also stores the light as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a LineRenderer's color to the given value. - Also stores the LineRenderer as the tween's target so it can be used for filtered operations. - Note that this method requires to also insert the start colors for the tween, - since LineRenderers have no way to get them. - The start value to tween from - The end value to reachThe duration of the tween - - - Tweens a Material's color to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Material's named color property to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween (like _Tint or _SpecColor) - The duration of the tween - - - Tweens a Material's alpha color to the given value - (will have no effect unless your material supports transparency). - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Material's alpha color to the given value - (will have no effect unless your material supports transparency). - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween (like _Tint or _SpecColor) - The duration of the tween - - - Tweens a Material's named float property to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween - The duration of the tween - - - Tweens a Material's texture offset to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The duration of the tween - - - Tweens a Material's named texture offset property to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween - The duration of the tween - - - Tweens a Material's texture scale to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The duration of the tween - - - Tweens a Material's named texture scale property to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween - The duration of the tween - - - Tweens a Material's named Vector property to the given value. - Also stores the material as the tween's target so it can be used for filtered operations - The end value to reach - The name of the material property to tween - The duration of the tween - - - Tweens a Rigidbody's position to the given value. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody's X position to the given value. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody's Y position to the given value. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody's Z position to the given value. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody's rotation to the given value. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - Rotation mode - - - Tweens a Rigidbody's rotation so that it will look towards the given position. - Also stores the rigidbody as the tween's target so it can be used for filtered operations - The position to look atThe duration of the tween - Eventual axis constraint for the rotation - The vector that defines in which direction up is (default: Vector3.up) - - - Tweens a Rigidbody's position to the given value, while also applying a jump effect along the Y axis. - Returns a Sequence instead of a Tweener. - Also stores the Rigidbody as the tween's target so it can be used for filtered operations - The end value to reach - Power of the jump (the max height of the jump is represented by this plus the final Y offset) - Total number of jumps - The duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a TrailRenderer's startWidth/endWidth to the given value. - Also stores the TrailRenderer as the tween's target so it can be used for filtered operations - The end startWidth to reachThe end endWidth to reach - The duration of the tween - - - Tweens a TrailRenderer's time to the given value. - Also stores the TrailRenderer as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's position to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's X position to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's Y position to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's Z position to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's localPosition to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's X localPosition to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's Y localPosition to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's Z localPosition to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's rotation to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - Rotation mode - - - Tweens a Transform's localRotation to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - Rotation mode - - - Tweens a Transform's localScale to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's localScale uniformly to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's X localScale to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's Y localScale to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's Z localScale to the given value. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Transform's rotation so that it will look towards the given position. - Also stores the transform as the tween's target so it can be used for filtered operations - The position to look atThe duration of the tween - Eventual axis constraint for the rotation - The vector that defines in which direction up is (default: Vector3.up) - - - Punches a Transform's localPosition towards the given direction and then back to the starting one - as if it was connected to the starting position via an elastic. - The direction and strength of the punch (added to the Transform's current position) - The duration of the tween - Indicates how much will the punch vibrate - Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. - 1 creates a full oscillation between the punch direction and the opposite direction, - while 0 oscillates only between the punch and the start position - If TRUE the tween will smoothly snap all values to integers - - - Punches a Transform's localScale towards the given size and then back to the starting one - as if it was connected to the starting scale via an elastic. - The punch strength (added to the Transform's current scale) - The duration of the tween - Indicates how much will the punch vibrate - Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. - 1 creates a full oscillation between the punch scale and the opposite scale, - while 0 oscillates only between the punch scale and the start scale - - - Punches a Transform's localRotation towards the given size and then back to the starting one - as if it was connected to the starting rotation via an elastic. - The punch strength (added to the Transform's current rotation) - The duration of the tween - Indicates how much will the punch vibrate - Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. - 1 creates a full oscillation between the punch rotation and the opposite rotation, - while 0 oscillates only between the punch and the start rotation - - - Shakes a Transform's localPosition with the given values. - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - If TRUE the tween will smoothly snap all values to integers - - - Shakes a Transform's localPosition with the given values. - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - If TRUE the tween will smoothly snap all values to integers - - - Shakes a Transform's localRotation. - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Transform's localRotation. - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Transform's localScale. - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Shakes a Transform's localScale. - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - - - Tweens a Transform's position to the given value, while also applying a jump effect along the Y axis. - Returns a Sequence instead of a Tweener. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reach - Power of the jump (the max height of the jump is represented by this plus the final Y offset) - Total number of jumps - The duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's localPosition to the given value, while also applying a jump effect along the Y axis. - Returns a Sequence instead of a Tweener. - Also stores the transform as the tween's target so it can be used for filtered operations - The end value to reach - Power of the jump (the max height of the jump is represented by this plus the final Y offset) - Total number of jumps - The duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's position through the given path waypoints, using the chosen path algorithm. - Also stores the transform as the tween's target so it can be used for filtered operations - The waypoints to go through - The duration of the tween - The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) - The path mode: 3D, side-scroller 2D, top-down 2D - The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. - Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints - The color of the path (shown when gizmos are active in the Play panel and the tween is running) - - - Tweens a Transform's localPosition through the given path waypoints, using the chosen path algorithm. - Also stores the transform as the tween's target so it can be used for filtered operations - The waypoint to go through - The duration of the tween - The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) - The path mode: 3D, side-scroller 2D, top-down 2D - The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. - Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints - The color of the path (shown when gizmos are active in the Play panel and the tween is running) - - - Tweens a Light's color to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Light as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - Tweens a Material's color to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Material as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - Tweens a Material's named color property to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Material as the tween's target so it can be used for filtered operations - The value to tween to - The name of the material property to tween (like _Tint or _SpecColor) - The duration of the tween - - - Tweens a Transform's position BY the given value (as if you chained a SetRelative), - in a way that allows other DOBlendableMove tweens to work together on the same target, - instead than fight each other as multiple DOMove would do. - Also stores the transform as the tween's target so it can be used for filtered operations - The value to tween byThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Transform's localPosition BY the given value (as if you chained a SetRelative), - in a way that allows other DOBlendableMove tweens to work together on the same target, - instead than fight each other as multiple DOMove would do. - Also stores the transform as the tween's target so it can be used for filtered operations - The value to tween byThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - EXPERIMENTAL METHOD - Tweens a Transform's rotation BY the given value (as if you chained a SetRelative), - in a way that allows other DOBlendableRotate tweens to work together on the same target, - instead than fight each other as multiple DORotate would do. - Also stores the transform as the tween's target so it can be used for filtered operations - The value to tween byThe duration of the tween - Rotation mode - - - EXPERIMENTAL METHOD - Tweens a Transform's lcoalRotation BY the given value (as if you chained a SetRelative), - in a way that allows other DOBlendableRotate tweens to work together on the same target, - instead than fight each other as multiple DORotate would do. - Also stores the transform as the tween's target so it can be used for filtered operations - The value to tween byThe duration of the tween - Rotation mode - - - Tweens a Transform's localScale BY the given value (as if you chained a SetRelative), - in a way that allows other DOBlendableScale tweens to work together on the same target, - instead than fight each other as multiple DOScale would do. - Also stores the transform as the tween's target so it can be used for filtered operations - The value to tween byThe duration of the tween - - - - Completes all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens completed - (meaning the tweens that don't have infinite loops and were not already complete) - - - - - Kills all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens killed. - - If TRUE completes the tween before killing it - - - - Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens flipped. - - - - - Sends to the given position all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens involved. - - Time position to reach - (if higher than the whole tween duration the tween will simply reach its end) - If TRUE will play the tween after reaching the given position, otherwise it will pause it - - - - Pauses all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens paused. - - - - - Plays all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Plays backwards all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Plays forward all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Restarts all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens restarted. - - - - - Rewinds all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens rewinded. - - - - - Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens involved. - - - - - Type of path to use with DOPath tweens - - - - Linear, composed of straight segments between each waypoint - - - Curved path (which uses Catmull-Rom curves) - - - - Main DOTween class. Contains static methods to create and control tweens in a generic way - - - - DOTween's version - - - If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things - (like targets becoming null while a tween is playing). - Default: TRUE - - - If TRUE you will get a DOTween report when exiting play mode (only in the Editor). - Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. - Beware, this will slightly slow down your tweens while inside Unity Editor. - Default: FALSE - - - Global DOTween timeScale. - Default: 1 - - - If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). - Deactivate this if you want to avoid gizmos overhead while in Unity Editor - - - Default updateType for new tweens. - Default: UpdateType.Normal - - - Sets whether Unity's timeScale should be taken into account by default or not. - Default: false - - - Default autoPlay behaviour for new tweens. - Default: AutoPlay.All - - - Default autoKillOnComplete behaviour for new tweens. - Default: TRUE - - - Default loopType applied to all new tweens. - Default: LoopType.Restart - - - If TRUE all newly created tweens are set as recyclable, otherwise not. - Default: FALSE - - - Default ease applied to all new Tweeners (not to Sequences which always have Ease.Linear as default). - Default: Ease.InOutQuad - - - Default overshoot/amplitude used for eases - Default: 1.70158f - - - Default period used for eases - Default: 0 - - - - Must be called once, before the first ever DOTween call/reference, - otherwise it will be called automatically and will use default options. - Calling it a second time won't have any effect. - You can chain SetCapacity to this method, to directly set the max starting size of Tweeners and Sequences: - DOTween.Init(false, false, LogBehaviour.Default).SetCapacity(100, 20); - - If TRUE all new tweens will be set for recycling, meaning that when killed, - instead of being destroyed, they will be put in a pool and reused instead of creating new tweens. This option allows you to avoid - GC allocations by reusing tweens, but you will have to take care of tween references, since they might result active - even if they were killed (since they might have been respawned and are now being used for other tweens). - If you want to automatically set your tween references to NULL when a tween is killed - you can use the OnKill callback like this: - .OnKill(()=> myTweenReference = null) - You can change this setting at any time by changing the static property, - or you can set the recycling behaviour for each tween separately, using: - SetRecyclable(bool recyclable) - Default: FALSE - If TRUE makes tweens slightly slower but safer, automatically taking care of a series of things - (like targets becoming null while a tween is playing). - You can change this setting at any time by changing the static property. - Default: FALSE - Type of logging to use. - You can change this setting at any time by changing the static property. - Default: ErrorsOnly - - - - Directly sets the current max capacity of Tweeners and Sequences - (meaning how many Tweeners and Sequences can be running at the same time), - so that DOTween doesn't need to automatically increase them in case the max is reached - (which might lead to hiccups when that happens). - Sequences capacity must be less or equal to Tweeners capacity - (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). - Beware: use this method only when there are no tweens running. - - Max Tweeners capacity. - Default: 200 - Max Sequences capacity. - Default: 50 - - - - Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values. - - If TRUE also destroys DOTween's gameObject and resets its initializiation, default settings and everything else - (so that next time you use it it will need to be re-initialized) - - - - Clears all cached tween pools. - - - - - Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL) - and returns the total number of invalid tweens found and removed. - Automatically called when loading a new scene if is TRUE. - BEWARE: this is a slightly expensive operation so use it with care - - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a property or field to the given value using a custom plugin - The plugin to use. Each custom plugin implements a static Get() method - you'll need to call to assign the correct plugin in the correct way, like this: - CustomPlugin.Get() - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens only one axis of a Vector3 to the given value using default plugins. - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - The axis to tween - - - Tweens only the alpha of a Color to the given value using default plugins - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end value to reachThe tween's duration - - - Tweens a virtual property from the given start to the given end value - and implements a setter that allows to use that value with an external method or a lambda - Example: - To(MyMethod, 0, 12, 0.5f); - Where MyMethod is a function that accepts a float parameter (which will be the result of the virtual tween) - The action to perform with the tweened value - The value to start from - The end value to reach - The duration of the virtual tween - - - - Punches a Vector3 towards the given direction and then back to the starting one - as if it was connected to the starting position via an elastic. - This tween type generates some GC allocations at startup - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The direction and strength of the punch - The duration of the tween - Indicates how much will the punch vibrate - Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. - 1 creates a full oscillation between the direction and the opposite decaying direction, - while 0 oscillates only between the starting position and the decaying direction - - - Shakes a Vector3 with the given values. - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction and behave like a random punch. - If TRUE only shakes on the X Y axis (looks better with things like cameras). - - - Shakes a Vector3 with the given values. - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction and behave like a random punch. - - - Tweens a property or field to the given values using default plugins. - Ease is applied between each segment and not as a whole. - This tween type generates some GC allocations at startup - A getter for the field or property to tween. - Example usage with lambda:()=> myProperty - A setter for the field or property to tween - Example usage with lambda:x=> myProperty = x - The end values to reach for each segment. This array must have the same length as durations - The duration of each segment. This array must have the same length as endValues - - - - Returns a new to be used for tween groups - - - - Completes all tweens and returns the number of actual tweens completed - (meaning tweens that don't have infinite loops and were not already complete) - - - Completes all tweens with the given ID or target and returns the number of actual tweens completed - (meaning the tweens that don't have infinite loops and were not already complete) - - - Flips all tweens (changing their direction to forward if it was backwards and viceversa), - then returns the number of actual tweens flipped - - - Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), - then returns the number of actual tweens flipped - - - Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved - - - Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) - and returns the actual tweens involved - - - Kills all tweens and returns the number of actual tweens killed - If TRUE completes the tweens before killing them - - - Kills all tweens with the given ID or target and returns the number of actual tweens killed - If TRUE completes the tweens before killing them - - - Pauses all tweens and returns the number of actual tweens paused - - - Pauses all tweens with the given ID or target and returns the number of actual tweens paused - (meaning the tweens that were actually playing and have been paused) - - - Plays all tweens and returns the number of actual tweens played - (meaning tweens that were not already playing or complete) - - - Plays all tweens with the given ID or target and returns the number of actual tweens played - (meaning the tweens that were not already playing or complete) - - - Plays all tweens with the given target and the given ID, and returns the number of actual tweens played - (meaning the tweens that were not already playing or complete) - - - Plays backwards all tweens and returns the number of actual tweens played - (meaning tweens that were not already started, playing backwards or rewinded) - - - Plays backwards all tweens with the given ID or target and returns the number of actual tweens played - (meaning the tweens that were not already started, playing backwards or rewinded) - - - Plays forward all tweens and returns the number of actual tweens played - (meaning tweens that were not already playing forward or complete) - - - Plays forward all tweens with the given ID or target and returns the number of actual tweens played - (meaning the tweens that were not already playing forward or complete) - - - Restarts all tweens, then returns the number of actual tweens restarted - - - Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted - - - Restarts all tweens with the given target and the given ID, and returns the number of actual tweens played - (meaning the tweens that were not already playing or complete) - - - Rewinds and pauses all tweens, then returns the number of actual tweens rewinded - (meaning tweens that were not already rewinded) - - - Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded - (meaning the tweens that were not already rewinded) - - - Toggles the play state of all tweens and returns the number of actual tweens toggled - (meaning tweens that could be played or paused, depending on the toggle state) - - - Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled - (meaning the tweens that could be played or paused, depending on the toggle state) - - - - Returns TRUE if a tween with the given ID or target is active (regardless if it's playing or not). - You can also use this to know if a shortcut tween is active for a given target. - Example: - transform.DOMoveX(45, 1); // transform is automatically added as the tween target - DOTween.IsTweening(transform); // Returns true - - - - - Returns the total number of active and playing tweens. - A tween is considered as playing even if its delay is actually playing - - - - - Returns a list of all active tweens in a playing state. - Returns NULL if there are no active playing tweens. - Beware: each time you call this method a new list is generated, so use it for debug only - - - - - Returns a list of all active tweens in a paused state. - Returns NULL if there are no active paused tweens. - Beware: each time you call this method a new list is generated, so use it for debug only - - - - - Returns a list of all active tweens with the given id. - Returns NULL if there are no active tweens with the given id. - Beware: each time you call this method a new list is generated - If TRUE returns only the tweens with the given ID that are currently playing - - - - - Returns a list of all active tweens with the given target. - Returns NULL if there are no active tweens with the given target. - Beware: each time you call this method a new list is generated - If TRUE returns only the tweens with the given target that are currently playing - - - - DOTween's log behaviour. - Default: LogBehaviour.ErrorsOnly - - - - Path plugin works exclusively with Transforms - - - - - Allows to wrap ease method in special ways, adding extra features - - - - - Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS - - FPS at which the tween should be played - Ease type - - - - Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS - - FPS at which the tween should be played - AnimationCurve to use for the ease - - - - Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS - - FPS at which the tween should be played - Custom ease function to use - - - - Types of loop - - - - Each loop cycle restarts from the beginning - - - The tween moves forward and backwards at alternate cycles - - - Continuously increments the tween at the end of each loop cycle (A to B, B to B+(A-B), and so on), thus always moving "onward". - In case of String tweens works only if the tween is set as relative - - - - Animates a single value - - - - Changes the start value of a tween and rewinds it (without pausing it). - Has no effect with tweens that are inside Sequences - The new start value - If bigger than 0 applies it as the new tween duration - - - Changes the end value of a tween and rewinds it (without pausing it). - Has no effect with tweens that are inside Sequences - The new end value - If bigger than 0 applies it as the new tween duration - If TRUE the start value will become the current target's value, otherwise it will stay the same - - - Changes the end value of a tween and rewinds it (without pausing it). - Has no effect with tweens that are inside Sequences - The new end value - If TRUE the start value will become the current target's value, otherwise it will stay the same - - - Changes the start and end value of a tween and rewinds it (without pausing it). - Has no effect with tweens that are inside Sequences - The new start value - The new end value - If bigger than 0 applies it as the new tween duration - - - - Creates virtual tweens that can be used to change other elements via their OnUpdate calls - - - - - Tweens a virtual float. - You can add regular settings to the generated tween, - but do not use SetUpdate or you will overwrite the onVirtualUpdate parameter - - The value to start from - The value to tween to - The duration of the tween - A callback which must accept a parameter of type float, called at each update - - - - Returns a value based on the given ease and lifetime percentage (0 to 1) - The value to start from when lifetimePercentage is 0 - The value to reach when lifetimePercentage is 1 - The time percentage (0 to 1) at which the value should be taken - The type of ease - - - Returns a value based on the given ease and lifetime percentage (0 to 1) - The value to start from when lifetimePercentage is 0 - The value to reach when lifetimePercentage is 1 - The time percentage (0 to 1) at which the value should be taken - The type of ease - Eventual overshoot to use with Back ease - - - Returns a value based on the given ease and lifetime percentage (0 to 1) - The value to start from when lifetimePercentage is 0 - The value to reach when lifetimePercentage is 1 - The time percentage (0 to 1) at which the value should be taken - The type of ease - Eventual amplitude to use with Elastic easeType - Eventual period to use with Elastic easeType - - - Returns a value based on the given ease and lifetime percentage (0 to 1) - The value to start from when lifetimePercentage is 0 - The value to reach when lifetimePercentage is 1 - The time percentage (0 to 1) at which the value should be taken - The AnimationCurve to use for ease - - - Fires the given callback after the given time. - Callback delay - Callback to fire when the delay has expired - If TRUE (default) ignores Unity's timeScale - - - - Used to interpret AnimationCurves as eases. - Public so it can be used by external ease factories - - - - - This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - Unused: here to keep same delegate for all ease types. - Unused: here to keep same delegate for all ease types. - - The eased value. - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - Unused: here to keep same delegate for all ease types. - Unused: here to keep same delegate for all ease types. - - The eased value. - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - Unused: here to keep same delegate for all ease types. - Unused: here to keep same delegate for all ease types. - - The eased value. - - - - - Struct that stores two colors (used for LineRenderer tweens) - - - - - What axis to constrain in case of Vector tweens - - - - - Type of scramble to apply to string tweens - - - - - No scrambling of characters - - - - - A-Z + a-z + 0-9 characters - - - - - A-Z characters - - - - - a-z characters - - - - - 0-9 characters - - - - - Custom characters - - - - - Path control point - - - - - Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected - - - - - Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected - - - - - Returns a Vector3 with z = 0 - - - - - Returns the 2D angle between two vectors - - - - - Gets the point on the path at the given percentage (0 to 1) - - The percentage (0 to 1) at which to get the point - If TRUE constant speed is taken into account, otherwise not - - - - Public only so custom shortcuts can access some of these methods - - - - - Additional notices passed to plugins when updating. - Public so it can be used by custom plugins. Internally, only PathPlugin uses it - - - - - None - - - - - Lets the plugin know that we restarted or rewinded - - - - + + + + DOTween + + + + + Update type + + + + Updates every frame during Update calls + + + Updates every frame during LateUpdate calls + + + Updates using FixedUpdate calls + + + + Path mode (used to determine correct LookAt orientation) + + + + Ignores the path mode (and thus LookAt behaviour) + + + Regular 3D path + + + 2D top-down path + + + 2D side-scroller path + + + + Used internally + + + + + This class serves only as a utility class to store tween settings to apply on multiple tweens. + It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining + + + + A variable you can eventually Clear and reuse when needed, + to avoid instantiating TweenParams objects + + + Creates a new TweenParams object, which you can use to store tween settings + to pass to multiple tweens via myTween.SetAs(myTweenParms) + + + Clears and resets this TweenParams instance using default values, + so it can be reused without instantiating another one + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual overshoot or amplitude to use with Back or Elastic easeType (default is 1.70158) + Eventual period to use with Elastic easeType (default is 0) + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function. + If applied to Sequences eases the whole sequence animation + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to the one defined in DOTween.defaultUpdateType (UpdateType.Normal unless changed) + and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update (default or independent) for the tween + The type of update (default: UpdateType.Normal) + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the onStart callback for the tween. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onRewind callback for the tween. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween. + Called when a path tween reaches a new waypoint + + + Sets a delayed startup for the tween. + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + + Used to separate DOTween class from the MonoBehaviour instance (in order to use static constructors on DOTween). + Contains all instance-based methods + + + + + Used to allow method chaining with DOTween.Init + + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + Used internally inside Unity Editor, as a trick to update DOTween's inspector at every frame + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Public so it can be used by lose scripts related to DOTween (like DOTweenAnimation) + + + + + Controls other tweens as a group + + + + + Indicates either a Tweener or a Sequence + + + + Called the first time the tween is set in a playing state, after any eventual delay + + + TimeScale for the tween + + + If TRUE the tween wil go backwards + + + Id (usable for filtering with DOTween static methods). Can be an int, a string, an object, or anything else + + + Tween target (usable for filtering with DOTween static methods). Automatically set by tween creation shorcuts + + + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Called each time the tween updates + + + Called the moment the tween completes one loop cycle + + + Called the moment the tween reaches completion (loops included) + + + Called the moment the tween is killed + + + Called when a path tween's current waypoint changes + + + Gets and sets the time position (loops included, delays excluded) of the tween + + + + Rotation mode used with DORotate methods + + + + + Fastest way that never rotates beyond 360° + + + + + Fastest way that rotates beyond 360° + + + + + Adds the given rotation to the transform using world axis and an advanced precision mode + (like when using transform.Rotate(Space.World)). + In this mode the end value is is always considered relative + + + + + Adds the given rotation to the transform's local axis + (like when rotating an object with the "local" switch enabled in Unity's editor or using transform.Rotate(Space.Self)). + In this mode the end value is is always considered relative + + + + + This plugin generates some GC allocations at startup + + + + + Don't assign this! It's assigned automatically when creating 0 duration tweens + + + + + Don't assign this! It's assigned automatically when setting the ease to an AnimationCurve or to a custom ease function + + + + + Types of log behaviours + + + + Log only warnings and errors + + + Log warnings, errors and additional infos + + + Log only errors + + + + Methods that extend Tween objects and allow to set their parameters + + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual overshoot to use with Back ease (default is 1.70158) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual amplitude to use with Elastic easeType (default is 1.70158) + Eventual period to use with Elastic easeType (default is 0) + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function (which must return a value between 0 and 1). + If applied to Sequences eases the whole sequence animation + + + Allows the tween to be recycled after being killed. + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to UpdateType.Normal and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update for the tween + The type of update (defalt: UpdateType.Normal) + + + Sets the type of update for the tween and lets you choose if it should be independent from Unity's Time.timeScale + The type of update + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the onStart callback for the tween. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onPlay callback for the tween. + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Sets the onRewind callback for the tween. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween. + Called when a path tween's current waypoint changes + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given one. + Doesn't copy specific SetOptions settings: those will need to be applied manually each time. + Has no effect if the tween has already started. + NOTE: the tween's target will not be changed + Tween from which to copy the parameters + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given TweenParams. + Has no effect if the tween has already started. + TweenParams from which to copy the parameters + + + Adds the given tween to the end of the Sequence. + Has no effect if the Sequence has already started + The tween to append + + + Adds the given tween to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The tween to prepend + + + Inserts the given tween at the same time position of the last tween added to the Sequence. + Has no effect if the Sequence has already started + + + Inserts the given tween at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the tween will be placed + The tween to insert + + + Adds the given interval to the end of the Sequence. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given interval to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given callback to the end of the Sequence. + Has no effect if the Sequence has already started + The callback to append + + + Adds the given callback to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The callback to prepend + + + Inserts the given callback at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the callback will be placed + The callback to insert + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + If TRUE the FROM value will be calculated as relative to the current one + + + Sets a delayed startup for the tween. + Has no effect on Sequences or if the tween has already started + + + Sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + Options for float tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Quaternion tweens + If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°. + If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative + + + Options for Color tweens + If TRUE only the alpha value of the color will be tweened + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE, rich text will be interpreted correctly while animated, + otherwise all tags will be considered as normal text + The type of scramble to use, if any + A string containing the characters to use for scrambling. + Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + Leave it to NULL to use default ones + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Path tweens (created via the DOPath shortcut) + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Options for Path tweens (created via the DOPath shortcut) + If TRUE the path will be automatically closed + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards the given position. + Must be chained directly to the tween creation method or to a SetOptions + The position to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards another transform. + Must be chained directly to the tween creation method or to a SetOptions + The transform to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target to the path, with the given lookAhead. + Must be chained directly to the tween creation method or to a SetOptions + The percentage of lookAhead to use (0 to 1) + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + + Methods that extend Tween objects and allow to control or get data from them + + + + Completes the tween + + + Flips the direction of this tween (backwards if it was going forward or viceversa) + + + Forces the tween to initialize its settings immediately + + + Send the tween to the given position in time + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + Kills the tween + If TRUE completes the tween before killing it + + + Pauses the tween + + + Plays the tween + + + Sets the tween in a backwards direction and plays it + + + Sets the tween in a forward direction and plays it + + + Restarts the tween from the beginning + If TRUE includes the eventual tween delay, otherwise skips it + + + Rewinds the tween + If TRUE includes the eventual tween delay, otherwise skips it + + + Plays the tween if it was paused, pauses it if it was playing + + + Send a path tween to the given waypoint. + Has no effect if this is not a path tween. + BEWARE, this is a special utility method: + it works only with Linear eases. Also, the lookAt direction might be wrong after calling this and might need to be set manually + (because it relies on a smooth path movement and doesn't work well with jumps that encompass dramatic direction changes) + Waypoint index to reach + (if higher than the max waypoint index the tween will simply go to the last one) + If TRUE will play the tween after reaching the given waypoint, otherwise it will pause it + + + + Creates a yield instruction that waits until the tween is killed or complete. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForCompletion(); + + + + + Creates a yield instruction that waits until the tween is killed or rewinded. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForRewind(); + + + + + Creates a yield instruction that waits until the tween is killed. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForKill(); + + + + + Creates a yield instruction that waits until the tween is killed or has gone through the given amount of loops. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForElapsedLoops(2); + + Elapsed loops to wait for + + + + Creates a yield instruction that waits until the tween is killed or has reached the given position (loops included, delays excluded). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForPosition(2.5f); + + Position (loops included, delays excluded) to wait for + + + + Creates a yield instruction that waits until the tween is killed or started + (meaning when the tween is set in a playing state the first time, after any eventual delay). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForStart(); + + + + Returns the total number of loops completed by this tween + + + Returns the eventual delay set for this tween + + + Returns the duration of this tween (delays excluded). + NOTE: when using settings like SpeedBased, the duration will be recalculated when the tween starts + If TRUE returns the full duration loops included, + otherwise the duration of a single loop cycle + + + Returns the elapsed time for this tween (delays exluded) + If TRUE returns the elapsed time since startup loops included, + otherwise the elapsed time within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded) + If TRUE returns the elapsed percentage since startup loops included, + otherwise the elapsed percentage within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded), + based on a single loop, and calculating eventual backwards Yoyo loops as 1 to 0 instead of 0 to 1 + + + Returns FALSE if this tween has been killed. + BEWARE: if this tween is recyclable it might have been spawned again for another use and thus return TRUE anyway. + When working with recyclable tweens you should take care to know when a tween has been killed and manually set your references to NULL. + If you want to be sure your references are set to NULL when a tween is killed you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + + + Returns TRUE if this tween was reversed and is set to go backwards + + + Returns TRUE if the tween is complete + (silently fails and returns FALSE if the tween has been killed) + + + Returns TRUE if this tween has been initialized + + + Returns TRUE if this tween is playing + + + + Returns a point on a path based on the given path percentage + (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized) + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + Percentage of the path (0 to 1) on which to get the point + + + + Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized). + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + + + + Used for tween callbacks + + + + + Used for tween callbacks + + + + + Used for custom and animationCurve-based ease functions. Must return a value between 0 and 1. + + + + + Used in place of System.Func, which is not available in mscorlib. + + + + + Used in place of System.Action. + + + + + Types of autoPlay behaviours + + + + No tween is automatically played + + + Only Sequences are automatically played + + + Only Tweeners are automatically played + + + All tweens are automatically played + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances + + + + Tweens an AudioSource's volume to the given value. + Also stores the AudioSource as the tween's target so it can be used for filtered operations + The end value to reach (0 to 1)The duration of the tween + + + Tweens an AudioSource's pitch to the given value. + Also stores the AudioSource as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's aspect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's backgroundColor to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's farClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's fieldOfView to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's nearClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's orthographicSize to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's pixelRect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's rect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Tweens a Light's color to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's intensity to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's shadowStrength to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a LineRenderer's color to the given value. + Also stores the LineRenderer as the tween's target so it can be used for filtered operations. + Note that this method requires to also insert the start colors for the tween, + since LineRenderers have no way to get them. + The start value to tween from + The end value to reachThe duration of the tween + + + Tweens a Material's color to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's named color property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's named float property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's named Vector property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Rigidbody's position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's X position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's Y position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's Z position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's rotation to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Rigidbody's rotation so that it will look towards the given position. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + Tweens a Rigidbody's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the Rigidbody as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a TrailRenderer's startWidth/endWidth to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end startWidth to reachThe end endWidth to reach + The duration of the tween + + + Tweens a TrailRenderer's time to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's rotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's localRotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's localScale uniformly to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's X localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Y localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Z localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's rotation so that it will look towards the given position. + Also stores the transform as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + Punches a Transform's localPosition towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + The direction and strength of the punch (added to the Transform's current position) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the punch direction and the opposite direction, + while 0 oscillates only between the punch and the start position + If TRUE the tween will smoothly snap all values to integers + + + Punches a Transform's localScale towards the given size and then back to the starting one + as if it was connected to the starting scale via an elastic. + The punch strength (added to the Transform's current scale) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + 1 creates a full oscillation between the punch scale and the opposite scale, + while 0 oscillates only between the punch scale and the start scale + + + Punches a Transform's localRotation towards the given size and then back to the starting one + as if it was connected to the starting rotation via an elastic. + The punch strength (added to the Transform's current rotation) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. + 1 creates a full oscillation between the punch rotation and the opposite rotation, + while 0 oscillates only between the punch and the start rotation + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Tweens a Transform's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's position through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoints to go through + The duration of the tween + The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + Tweens a Transform's localPosition through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoint to go through + The duration of the tween + The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + Tweens a Light's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Light as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's named color property to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween to + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Transform's position BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + EXPERIMENTAL METHOD - Tweens a Transform's rotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + EXPERIMENTAL METHOD - Tweens a Transform's lcoalRotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + Tweens a Transform's localScale BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableScale tweens to work together on the same target, + instead than fight each other as multiple DOScale would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + + Type of path to use with DOPath tweens + + + + Linear, composed of straight segments between each waypoint + + + Curved path (which uses Catmull-Rom curves) + + + + Main DOTween class. Contains static methods to create and control tweens in a generic way + + + + DOTween's version + + + If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + Default: TRUE + + + If TRUE you will get a DOTween report when exiting play mode (only in the Editor). + Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. + Beware, this will slightly slow down your tweens while inside Unity Editor. + Default: FALSE + + + Global DOTween timeScale. + Default: 1 + + + If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). + Deactivate this if you want to avoid gizmos overhead while in Unity Editor + + + Default updateType for new tweens. + Default: UpdateType.Normal + + + Sets whether Unity's timeScale should be taken into account by default or not. + Default: false + + + Default autoPlay behaviour for new tweens. + Default: AutoPlay.All + + + Default autoKillOnComplete behaviour for new tweens. + Default: TRUE + + + Default loopType applied to all new tweens. + Default: LoopType.Restart + + + If TRUE all newly created tweens are set as recyclable, otherwise not. + Default: FALSE + + + Default ease applied to all new Tweeners (not to Sequences which always have Ease.Linear as default). + Default: Ease.InOutQuad + + + Default overshoot/amplitude used for eases + Default: 1.70158f + + + Default period used for eases + Default: 0 + + + + Must be called once, before the first ever DOTween call/reference, + otherwise it will be called automatically and will use default options. + Calling it a second time won't have any effect. + You can chain SetCapacity to this method, to directly set the max starting size of Tweeners and Sequences: + DOTween.Init(false, false, LogBehaviour.Default).SetCapacity(100, 20); + + If TRUE all new tweens will be set for recycling, meaning that when killed, + instead of being destroyed, they will be put in a pool and reused instead of creating new tweens. This option allows you to avoid + GC allocations by reusing tweens, but you will have to take care of tween references, since they might result active + even if they were killed (since they might have been respawned and are now being used for other tweens). + If you want to automatically set your tween references to NULL when a tween is killed + you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + You can change this setting at any time by changing the static property, + or you can set the recycling behaviour for each tween separately, using: + SetRecyclable(bool recyclable) + Default: FALSE + If TRUE makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + You can change this setting at any time by changing the static property. + Default: FALSE + Type of logging to use. + You can change this setting at any time by changing the static property. + Default: ErrorsOnly + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values. + + If TRUE also destroys DOTween's gameObject and resets its initializiation, default settings and everything else + (so that next time you use it it will need to be re-initialized) + + + + Clears all cached tween pools. + + + + + Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL) + and returns the total number of invalid tweens found and removed. + Automatically called when loading a new scene if is TRUE. + BEWARE: this is a slightly expensive operation so use it with care + + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using a custom plugin + The plugin to use. Each custom plugin implements a static Get() method + you'll need to call to assign the correct plugin in the correct way, like this: + CustomPlugin.Get() + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens only one axis of a Vector3 to the given value using default plugins. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + The axis to tween + + + Tweens only the alpha of a Color to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a virtual property from the given start to the given end value + and implements a setter that allows to use that value with an external method or a lambda + Example: + To(MyMethod, 0, 12, 0.5f); + Where MyMethod is a function that accepts a float parameter (which will be the result of the virtual tween) + The action to perform with the tweened value + The value to start from + The end value to reach + The duration of the virtual tween + + + + Punches a Vector3 towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The direction and strength of the punch + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the direction and the opposite decaying direction, + while 0 oscillates only between the starting position and the decaying direction + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + If TRUE only shakes on the X Y axis (looks better with things like cameras). + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + + + Tweens a property or field to the given values using default plugins. + Ease is applied between each segment and not as a whole. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end values to reach for each segment. This array must have the same length as durations + The duration of each segment. This array must have the same length as endValues + + + + Returns a new to be used for tween groups + + + + Completes all tweens and returns the number of actual tweens completed + (meaning tweens that don't have infinite loops and were not already complete) + + + Completes all tweens with the given ID or target and returns the number of actual tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + + Flips all tweens (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved + + + Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) + and returns the actual tweens involved + + + Kills all tweens and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Kills all tweens with the given ID or target and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Pauses all tweens and returns the number of actual tweens paused + + + Pauses all tweens with the given ID or target and returns the number of actual tweens paused + (meaning the tweens that were actually playing and have been paused) + + + Plays all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing or complete) + + + Plays all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays backwards all tweens and returns the number of actual tweens played + (meaning tweens that were not already started, playing backwards or rewinded) + + + Plays backwards all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already started, playing backwards or rewinded) + + + Plays forward all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing forward or complete) + + + Plays forward all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing forward or complete) + + + Restarts all tweens, then returns the number of actual tweens restarted + + + Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted + + + Restarts all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Rewinds and pauses all tweens, then returns the number of actual tweens rewinded + (meaning tweens that were not already rewinded) + + + Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded + (meaning the tweens that were not already rewinded) + + + Toggles the play state of all tweens and returns the number of actual tweens toggled + (meaning tweens that could be played or paused, depending on the toggle state) + + + Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled + (meaning the tweens that could be played or paused, depending on the toggle state) + + + + Returns TRUE if a tween with the given ID or target is active (regardless if it's playing or not). + You can also use this to know if a shortcut tween is active for a given target. + Example: + transform.DOMoveX(45, 1); // transform is automatically added as the tween target + DOTween.IsTweening(transform); // Returns true + + + + + Returns the total number of active and playing tweens. + A tween is considered as playing even if its delay is actually playing + + + + + Returns a list of all active tweens in a playing state. + Returns NULL if there are no active playing tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + + + + Returns a list of all active tweens in a paused state. + Returns NULL if there are no active paused tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + + + + Returns a list of all active tweens with the given id. + Returns NULL if there are no active tweens with the given id. + Beware: each time you call this method a new list is generated + If TRUE returns only the tweens with the given ID that are currently playing + + + + + Returns a list of all active tweens with the given target. + Returns NULL if there are no active tweens with the given target. + Beware: each time you call this method a new list is generated + If TRUE returns only the tweens with the given target that are currently playing + + + + DOTween's log behaviour. + Default: LogBehaviour.ErrorsOnly + + + + Path plugin works exclusively with Transforms + + + + + Allows to wrap ease method in special ways, adding extra features + + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Ease type + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + AnimationCurve to use for the ease + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Custom ease function to use + + + + Types of loop + + + + Each loop cycle restarts from the beginning + + + The tween moves forward and backwards at alternate cycles + + + Continuously increments the tween at the end of each loop cycle (A to B, B to B+(A-B), and so on), thus always moving "onward". + In case of String tweens works only if the tween is set as relative + + + + Animates a single value + + + + Changes the start value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + If bigger than 0 applies it as the new tween duration + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If bigger than 0 applies it as the new tween duration + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the start and end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + The new end value + If bigger than 0 applies it as the new tween duration + + + + Creates virtual tweens that can be used to change other elements via their OnUpdate calls + + + + + Tweens a virtual float. + You can add regular settings to the generated tween, + but do not use SetUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type float, called at each update + + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual overshoot to use with Back ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual amplitude to use with Elastic easeType + Eventual period to use with Elastic easeType + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The AnimationCurve to use for ease + + + Fires the given callback after the given time. + Callback delay + Callback to fire when the delay has expired + If TRUE (default) ignores Unity's timeScale + + + + Used to interpret AnimationCurves as eases. + Public so it can be used by external ease factories + + + + + This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Struct that stores two colors (used for LineRenderer tweens) + + + + + What axis to constrain in case of Vector tweens + + + + + Type of scramble to apply to string tweens + + + + + No scrambling of characters + + + + + A-Z + a-z + 0-9 characters + + + + + A-Z characters + + + + + a-z characters + + + + + 0-9 characters + + + + + Custom characters + + + + + Path control point + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Returns a Vector3 with z = 0 + + + + + Returns the 2D angle between two vectors + + + + + Gets the point on the path at the given percentage (0 to 1) + + The percentage (0 to 1) at which to get the point + If TRUE constant speed is taken into account, otherwise not + + + + Public only so custom shortcuts can access some of these methods + + + + + Additional notices passed to plugins when updating. + Public so it can be used by custom plugins. Internally, only PathPlugin uses it + + + + + None + + + + + Lets the plugin know that we restarted or rewinded + + + + diff --git a/Assets/ThirdParty/Demigiant/DOTween/DOTween43.xml b/Assets/ThirdParty/Demigiant/DOTween/DOTween43.xml index 2d78cb81..d8f9b1b5 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/DOTween43.xml +++ b/Assets/ThirdParty/Demigiant/DOTween/DOTween43.xml @@ -1,64 +1,64 @@ - - - - DOTween43 - - - - - Methods that extend known Unity objects and allow to directly create and control tweens from their instances. - These, as all DOTween43 methods, require Unity 4.3 or later. - - - - Tweens a SpriteRenderer's color to the given value. - Also stores the spriteRenderer as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Material's alpha color to the given value. - Also stores the spriteRenderer as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Rigidbody2D's position to the given value. - Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody2D's X position to the given value. - Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody2D's Y position to the given value. - Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody2D's rotation to the given value. - Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Rigidbody2D's position to the given value, while also applying a jump effect along the Y axis. - Returns a Sequence instead of a Tweener. - Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations - The end value to reach - Power of the jump (the max height of the jump is represented by this plus the final Y offset) - Total number of jumps - The duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a SpriteRenderer's color to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - + + + + DOTween43 + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween43 methods, require Unity 4.3 or later. + + + + Tweens a SpriteRenderer's color to the given value. + Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's alpha color to the given value. + Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Rigidbody2D's position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's X position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's Y position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's rotation to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Rigidbody2D's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a SpriteRenderer's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + diff --git a/Assets/ThirdParty/Demigiant/DOTween/DOTween46.xml b/Assets/ThirdParty/Demigiant/DOTween/DOTween46.xml index c19bb732..e8e9c060 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/DOTween46.xml +++ b/Assets/ThirdParty/Demigiant/DOTween/DOTween46.xml @@ -1,185 +1,185 @@ - - - - DOTween46 - - - - - Methods that extend known Unity objects and allow to directly create and control tweens from their instances. - These, as all DOTween46 methods, require Unity 4.6 or later. - - - - Tweens a CanvasGroup's alpha color to the given value. - Also stores the canvasGroup as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens an Graphic's color to the given value. - Also stores the image as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens an Graphic's alpha color to the given value. - Also stores the image as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens an Image's color to the given value. - Also stores the image as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens an Image's alpha color to the given value. - Also stores the image as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens an Image's fillAmount to the given value. - Also stores the image as the tween's target so it can be used for filtered operations - The end value to reach (0 to 1)The duration of the tween - - - Tweens an LayoutElement's flexibleWidth/Height to the given value. - Also stores the LayoutElement as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens an LayoutElement's minWidth/Height to the given value. - Also stores the LayoutElement as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens an LayoutElement's preferredWidth/Height to the given value. - Also stores the LayoutElement as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Outline's effectColor to the given value. - Also stores the Outline as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Outline's effectColor alpha to the given value. - Also stores the Outline as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Outline's effectDistance to the given value. - Also stores the Outline as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a RectTransform's anchoredPosition to the given value. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a RectTransform's anchoredPosition3D to the given value. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a RectTransform's sizeDelta to the given value. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Punches a RectTransform's anchoredPosition towards the given direction and then back to the starting one - as if it was connected to the starting position via an elastic. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The direction and strength of the punch (added to the RectTransform's current position) - The duration of the tween - Indicates how much will the punch vibrate - Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. - 1 creates a full oscillation between the punch direction and the opposite direction, - while 0 oscillates only between the punch and the start position - If TRUE the tween will smoothly snap all values to integers - - - Shakes a RectTransform's anchoredPosition with the given values. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - If TRUE the tween will smoothly snap all values to integers - - - Shakes a RectTransform's anchoredPosition with the given values. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The duration of the tween - The shake strength on each axis - Indicates how much will the shake vibrate - Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). - Setting it to 0 will shake along a single direction. - If TRUE the tween will smoothly snap all values to integers - - - Tweens a RectTransform's anchoredPosition to the given value, while also applying a jump effect along the Y axis. - Returns a Sequence instead of a Tweener. - Also stores the RectTransform as the tween's target so it can be used for filtered operations - The end value to reach - Power of the jump (the max height of the jump is represented by this plus the final Y offset) - Total number of jumps - The duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Slider's value to the given value. - Also stores the Slider as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Text's color to the given value. - Also stores the Text as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Text's alpha color to the given value. - Also stores the Text as the tween's target so it can be used for filtered operations - The end value to reachThe duration of the tween - - - Tweens a Text's text to the given value. - Also stores the Text as the tween's target so it can be used for filtered operations - The end string to tween toThe duration of the tween - If TRUE (default), rich text will be interpreted correctly while animated, - otherwise all tags will be considered as normal text - The type of scramble mode to use, if any - A string containing the characters to use for scrambling. - Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. - Leave it to NULL (default) to use default ones - - - Tweens a Graphic's color to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Graphic as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - Tweens a Image's color to the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Image as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - Tweens a Text's color BY the given value, - in a way that allows other DOBlendableColor tweens to work together on the same target, - instead than fight each other as multiple DOColor would do. - Also stores the Text as the tween's target so it can be used for filtered operations - The value to tween toThe duration of the tween - - - + + + + DOTween46 + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween46 methods, require Unity 4.6 or later. + + + + Tweens a CanvasGroup's alpha color to the given value. + Also stores the canvasGroup as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Graphic's color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Graphic's alpha color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's alpha color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's fillAmount to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reach (0 to 1)The duration of the tween + + + Tweens an LayoutElement's flexibleWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens an LayoutElement's minWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens an LayoutElement's preferredWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Outline's effectColor to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Outline's effectColor alpha to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Outline's effectDistance to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a RectTransform's anchoredPosition to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition3D to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's sizeDelta to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Punches a RectTransform's anchoredPosition towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The direction and strength of the punch (added to the RectTransform's current position) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the punch direction and the opposite direction, + while 0 oscillates only between the punch and the start position + If TRUE the tween will smoothly snap all values to integers + + + Shakes a RectTransform's anchoredPosition with the given values. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a RectTransform's anchoredPosition with the given values. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Slider's value to the given value. + Also stores the Slider as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Text's color to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Text's alpha color to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Text's text to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end string to tween toThe duration of the tween + If TRUE (default), rich text will be interpreted correctly while animated, + otherwise all tags will be considered as normal text + The type of scramble mode to use, if any + A string containing the characters to use for scrambling. + Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + Leave it to NULL (default) to use default ones + + + Tweens a Graphic's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Graphic as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Image's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Image as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Text's color BY the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Text as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + diff --git a/Assets/ThirdParty/Demigiant/DOTween/DOTween50.xml b/Assets/ThirdParty/Demigiant/DOTween/DOTween50.xml index 5c9ddd31..474c6a76 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/DOTween50.xml +++ b/Assets/ThirdParty/Demigiant/DOTween/DOTween50.xml @@ -1,103 +1,103 @@ - - - - DOTween50 - - - - - Methods that extend known Unity objects and allow to directly create and control tweens from their instances. - These, as all DOTween50 methods, require Unity 5.0 or later. - - - - Tweens an AudioMixer's exposed float to the given value. - Also stores the AudioMixer as the tween's target so it can be used for filtered operations. - Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer. - Name given to the exposed float to set - The end value to reachThe duration of the tween - - - - Completes all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens completed - (meaning the tweens that don't have infinite loops and were not already complete) - - - - - Kills all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens killed. - - If TRUE completes the tween before killing it - - - - Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens flipped. - - - - - Sends to the given position all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens involved. - - Time position to reach - (if higher than the whole tween duration the tween will simply reach its end) - If TRUE will play the tween after reaching the given position, otherwise it will pause it - - - - Pauses all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens paused. - - - - - Plays all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Plays backwards all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Plays forward all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens played. - - - - - Restarts all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens restarted. - - - - - Rewinds all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens rewinded. - - - - - Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference - (meaning tweens that were started from this target, or that had this target added as an Id) - and returns the total number of tweens involved. - - - - + + + + DOTween50 + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween50 methods, require Unity 5.0 or later. + + + + Tweens an AudioMixer's exposed float to the given value. + Also stores the AudioMixer as the tween's target so it can be used for filtered operations. + Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer. + Name given to the exposed float to set + The end value to reachThe duration of the tween + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + diff --git a/Assets/ThirdParty/Demigiant/DOTween/Editor/DOTweenEditor.XML b/Assets/ThirdParty/Demigiant/DOTween/Editor/DOTweenEditor.XML index db17f443..78cbb4db 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/Editor/DOTweenEditor.XML +++ b/Assets/ThirdParty/Demigiant/DOTween/Editor/DOTweenEditor.XML @@ -1,65 +1,65 @@ - - - - DOTweenEditor - - - - - Not used as menu item anymore, but as a utiity function - - - - - Setups DOTween - - If TRUE, no warning window appears in case there is no need for setup - - - - Checks that the given editor texture use the correct import settings, - and applies them if they're incorrect. - - - - - Returns TRUE if addons setup is required. - - - - - Returns TRUE if the file/directory at the given path exists. - - Path, relative to Unity's project folder - - - - - Converts the given project-relative path to a full path, - with backward (\) slashes). - - - - - Converts the given full path to a path usable with AssetDatabase methods - (relative to Unity's project folder, and with the correct Unity forward (/) slashes). - - - - - Connects to a asset. - If the asset already exists at the given path, loads it and returns it. - Otherwise, either returns NULL or automatically creates it before loading and returning it - (depending on the given parameters). - - Asset type - File path (relative to Unity's project folder) - If TRUE and the requested asset doesn't exist, forces its creation - - - - Full path for the given loaded assembly, assembly file included - - - - + + + + DOTweenEditor + + + + + Not used as menu item anymore, but as a utiity function + + + + + Setups DOTween + + If TRUE, no warning window appears in case there is no need for setup + + + + Checks that the given editor texture use the correct import settings, + and applies them if they're incorrect. + + + + + Returns TRUE if addons setup is required. + + + + + Returns TRUE if the file/directory at the given path exists. + + Path, relative to Unity's project folder + + + + + Converts the given project-relative path to a full path, + with backward (\) slashes). + + + + + Converts the given full path to a path usable with AssetDatabase methods + (relative to Unity's project folder, and with the correct Unity forward (/) slashes). + + + + + Connects to a asset. + If the asset already exists at the given path, loads it and returns it. + Otherwise, either returns NULL or automatically creates it before loading and returning it + (depending on the given parameters). + + Asset type + File path (relative to Unity's project folder) + If TRUE and the requested asset doesn't exist, forces its creation + + + + Full path for the given loaded assembly, assembly file included + + + + diff --git a/Assets/ThirdParty/Demigiant/DOTween/readme.txt b/Assets/ThirdParty/Demigiant/DOTween/readme.txt index 3439db19..3d785c82 100644 --- a/Assets/ThirdParty/Demigiant/DOTween/readme.txt +++ b/Assets/ThirdParty/Demigiant/DOTween/readme.txt @@ -1,18 +1,18 @@ -DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant - -// GET STARTED ////////////////////////////////////////////// - -- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. -- In your code, add "using DG.Tweening" to each class where you want to use DOTween. -- You're ready to tween. Check out the links below for full documentation and license info. - - -// LINKS /////////////////////////////////////////////////////// - -DOTween website (documentation, examples, etc): http://dotween.demigiant.com -DOTween license: http://dotween.demigiant.com/license.php -DOTween repository (Google Code): https://code.google.com/p/dotween/ - -// NOTES ////////////////////////////////////////////////////// - +DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ + +// NOTES ////////////////////////////////////////////////////// + - DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenAnimation.cs b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenAnimation.cs index b36860de..a1eae773 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenAnimation.cs +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenAnimation.cs @@ -1,482 +1,482 @@ -// Author: Daniele Giardini - http://www.demigiant.com -// Created: 2015/03/12 15:55 - -using System; -using System.Collections.Generic; -using DG.Tweening.Core; -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.UI; - -#if DOTWEEN_TMP - using TMPro; -#endif - -#pragma warning disable 1591 -namespace DG.Tweening -{ - /// - /// Attach this to a GameObject to create a tween - /// - [AddComponentMenu("DOTween/DOTween Animation")] - public class DOTweenAnimation : ABSAnimationComponent - { - public float delay; - public float duration = 1; - public Ease easeType = Ease.OutQuad; - public AnimationCurve easeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)); - public LoopType loopType = LoopType.Restart; - public int loops = 1; - public string id = ""; - public bool isRelative; - public bool isFrom; - public bool isIndependentUpdate = false; - public bool autoKill = true; - - public bool isActive = true; - public bool isValid; - public Component target; - public DOTweenAnimationType animationType; - public bool autoPlay = true; - - public float endValueFloat; - public Vector3 endValueV3; - public Color endValueColor = new Color(1, 1, 1, 1); - public string endValueString = ""; - public Rect endValueRect = new Rect(0, 0, 0, 0); - - public bool optionalBool0; - public float optionalFloat0; - public int optionalInt0; - public RotateMode optionalRotationMode = RotateMode.Fast; - public ScrambleMode optionalScrambleMode = ScrambleMode.None; - public string optionalString; - - int _playCount = -1; // Used when calling DOPlayNext - - #region Unity Methods - - void Awake() - { - if (!isActive || !isValid) return; - - CreateTween(); - } - - void OnDestroy() - { - if (tween != null && tween.IsActive()) tween.Kill(); - tween = null; - } - - // Used also by DOTweenAnimationInspector when applying runtime changes and restarting - public void CreateTween() - { - if (target == null) { - Debug.LogWarning(string.Format("{0} :: This tween's target is NULL, because the animation was created with a DOTween Pro version older than 0.9.255. To fix this, exit Play mode then simply select this object, and it will update automatically", this.gameObject.name), this.gameObject); - return; - } - - Type t = target.GetType(); - -// Component c; - switch (animationType) { - case DOTweenAnimationType.None: - break; - case DOTweenAnimationType.Move: - if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOAnchorPos3D(endValueV3, duration, optionalBool0); - else if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); - else if (t.IsSameOrSubclassOf(typeof(Rigidbody2D))) tween = ((Rigidbody2D)target).DOMove(endValueV3, duration, optionalBool0); - else if (t.IsSameOrSubclassOf(typeof(Rigidbody))) tween = ((Rigidbody)target).DOMove(endValueV3, duration, optionalBool0); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Rigidbody2D)c).DOMove(endValueV3, duration, optionalBool0); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Rigidbody)c).DOMove(endValueV3, duration, optionalBool0); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((RectTransform)c).DOAnchorPos3D(endValueV3, duration, optionalBool0); -// goto SetupTween; -// } -// tween = transform.DOMove(endValueV3, duration, optionalBool0); - break; - case DOTweenAnimationType.LocalMove: - tween = transform.DOLocalMove(endValueV3, duration, optionalBool0); - break; - case DOTweenAnimationType.Rotate: - if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DORotate(endValueV3, duration, optionalRotationMode); - else if (t.IsSameOrSubclassOf(typeof(Rigidbody2D))) tween = ((Rigidbody2D)target).DORotate(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(Rigidbody))) tween = ((Rigidbody)target).DORotate(endValueV3, duration, optionalRotationMode); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Rigidbody2D)c).DORotate(endValueFloat, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Rigidbody)c).DORotate(endValueV3, duration, optionalRotationMode); -// goto SetupTween; -// } -// tween = transform.DORotate(endValueV3, duration, optionalRotationMode); - break; - case DOTweenAnimationType.LocalRotate: - tween = transform.DOLocalRotate(endValueV3, duration, optionalRotationMode); - break; - case DOTweenAnimationType.Scale: - tween = transform.DOScale(optionalBool0 ? new Vector3(endValueFloat, endValueFloat, endValueFloat) : endValueV3, duration); - break; - case DOTweenAnimationType.Color: - isRelative = false; - if (t.IsSameOrSubclassOf(typeof(SpriteRenderer))) tween = ((SpriteRenderer)target).DOColor(endValueColor, duration); - else if (t.IsSameOrSubclassOf(typeof(Renderer))) tween = ((Renderer)target).material.DOColor(endValueColor, duration); - else if (t.IsSameOrSubclassOf(typeof(Image))) tween = ((Image)target).DOColor(endValueColor, duration); - else if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOColor(endValueColor, duration); -#if DOTWEEN_TK2D - else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOColor(endValueColor, duration); - else if (t.IsSameOrSubclassOf(typeof(tk2dBaseSprite))) tween = ((tk2dBaseSprite)target).DOColor(endValueColor, duration); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((tk2dBaseSprite)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } -#endif -#if DOTWEEN_TMP - else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOColor(endValueColor, duration); - else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOColor(endValueColor, duration); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshPro)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshProUGUI)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } -#endif -// c = this.GetComponent(); -// if (c != null) { -// tween = ((SpriteRenderer)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Renderer)c).material.DOColor(endValueColor, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Image)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Text)c).DOColor(endValueColor, duration); -// goto SetupTween; -// } - break; - case DOTweenAnimationType.Fade: - isRelative = false; - if (t.IsSameOrSubclassOf(typeof(SpriteRenderer))) tween = ((SpriteRenderer)target).DOFade(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(Renderer))) tween = ((Renderer)target).material.DOFade(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(Image))) tween = ((Image)target).DOFade(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOFade(endValueFloat, duration); -#if DOTWEEN_TK2D - else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOFade(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(tk2dBaseSprite))) tween = ((tk2dBaseSprite)target).DOFade(endValueFloat, duration); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((tk2dBaseSprite)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } -#endif -#if DOTWEEN_TMP - else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOFade(endValueFloat, duration); - else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOFade(endValueFloat, duration); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshPro)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshProUGUI)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } -#endif -// c = this.GetComponent(); -// if (c != null) { -// tween = ((SpriteRenderer)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Renderer)c).material.DOFade(endValueFloat, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Image)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Text)c).DOFade(endValueFloat, duration); -// goto SetupTween; -// } - break; - case DOTweenAnimationType.Text: - if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((Text)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// goto SetupTween; -// } -#if DOTWEEN_TK2D - else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((tk2dTextMesh)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// goto SetupTween; -// } -#endif -#if DOTWEEN_TMP - else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); - else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshPro)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// goto SetupTween; -// } -// c = this.GetComponent(); -// if (c != null) { -// tween = ((TextMeshProUGUI)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); -// goto SetupTween; -// } -#endif - break; - case DOTweenAnimationType.PunchPosition: - if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOPunchAnchorPos(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); - else if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOPunchPosition(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); -// tween = transform.DOPunchPosition(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); - break; - case DOTweenAnimationType.PunchScale: - tween = transform.DOPunchScale(endValueV3, duration, optionalInt0, optionalFloat0); - break; - case DOTweenAnimationType.PunchRotation: - tween = transform.DOPunchRotation(endValueV3, duration, optionalInt0, optionalFloat0); - break; - case DOTweenAnimationType.ShakePosition: - if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOShakeAnchorPos(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); - if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOShakePosition(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); -// tween = transform.DOShakePosition(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); - break; - case DOTweenAnimationType.ShakeScale: - tween = transform.DOShakeScale(duration, endValueV3, optionalInt0, optionalFloat0); - break; - case DOTweenAnimationType.ShakeRotation: - tween = transform.DOShakeRotation(duration, endValueV3, optionalInt0, optionalFloat0); - break; - case DOTweenAnimationType.CameraAspect: - tween = ((Camera)target).DOAspect(endValueFloat, duration); - break; - case DOTweenAnimationType.CameraBackgroundColor: - tween = ((Camera)target).DOColor(endValueColor, duration); - break; - case DOTweenAnimationType.CameraFieldOfView: - tween = ((Camera)target).DOFieldOfView(endValueFloat, duration); - break; - case DOTweenAnimationType.CameraOrthoSize: - tween = ((Camera)target).DOOrthoSize(endValueFloat, duration); - break; - case DOTweenAnimationType.CameraPixelRect: - tween = ((Camera)target).DOPixelRect(endValueRect, duration); - break; - case DOTweenAnimationType.CameraRect: - tween = ((Camera)target).DORect(endValueRect, duration); - break; - } - -// SetupTween: - if (tween == null) return; - - if (isFrom) { - ((Tweener)tween).From(isRelative); - } else { - tween.SetRelative(isRelative); - } - tween.SetTarget(this.gameObject).SetDelay(delay).SetLoops(loops, loopType).SetAutoKill(autoKill) - .OnKill(()=> tween = null); - if (easeType == Ease.INTERNAL_Custom) tween.SetEase(easeCurve); - else tween.SetEase(easeType); - if (!string.IsNullOrEmpty(id)) tween.SetId(id); - tween.SetUpdate(isIndependentUpdate); - - if (hasOnStart) { - if (onStart != null) tween.OnStart(onStart.Invoke); - } else onStart = null; - if (hasOnPlay) { - if (onPlay != null) tween.OnPlay(onPlay.Invoke); - } else onPlay = null; - if (hasOnUpdate) { - if (onUpdate != null) tween.OnUpdate(onUpdate.Invoke); - } else onUpdate = null; - if (hasOnStepComplete) { - if (onStepComplete != null) tween.OnStepComplete(onStepComplete.Invoke); - } else onStepComplete = null; - if (hasOnComplete) { - if (onComplete != null) tween.OnComplete(onComplete.Invoke); - } else onComplete = null; - - if (autoPlay) tween.Play(); - else tween.Pause(); - } - - #endregion - - #region Public Methods - - // These methods are here so they can be called directly via Unity's UGUI event system - - public override void DOPlay() - { - DOTween.Play(this.gameObject); - } - - public override void DOPlayBackwards() - { - DOTween.PlayBackwards(this.gameObject); - } - - public override void DOPlayForward() - { - DOTween.PlayForward(this.gameObject); - } - - public override void DOPause() - { - DOTween.Pause(this.gameObject); - } - - public override void DOTogglePause() - { - DOTween.TogglePause(this.gameObject); - } - - public override void DORewind() - { - _playCount = -1; - // Rewind using Components order (in case there are multiple animations on the same property) - DOTweenAnimation[] anims = this.gameObject.GetComponents(); - for (int i = anims.Length - 1; i > -1; --i) { - Tween t = anims[i].tween; - if (t != null && t.IsInitialized()) anims[i].tween.Rewind(); - } - // DOTween.Rewind(this.gameObject); - } - - /// - /// Restarts the tween - /// - /// If TRUE, re-evaluates the tween's start and end values from its current position. - /// Set it to TRUE when spawning the same DOTweenAnimation in different positions (like when using a pooling system) - public override void DORestart(bool fromHere = false) - { - _playCount = -1; - if (tween == null) { - if (Debugger.logPriority > 1) Debugger.LogNullTween(tween); return; - } - if (fromHere && isRelative) ReEvaluateRelativeTween(); - DOTween.Restart(this.gameObject); - } - - public override void DOComplete() - { - DOTween.Complete(this.gameObject); - } - - public override void DOKill() - { - DOTween.Kill(this.gameObject); - tween = null; - } - - #region Specifics - - public void DOPlayById(string id) - { - DOTween.Play(this.gameObject, id); - } - public void DOPlayAllById(string id) - { - DOTween.Play(id); - } - - public void DOPlayNext() - { - DOTweenAnimation[] anims = this.GetComponents(); - while (_playCount < anims.Length - 1) { - _playCount++; - DOTweenAnimation anim = anims[_playCount]; - if (anim != null && anim.tween != null && !anim.tween.IsPlaying() && !anim.tween.IsComplete()) { - anim.tween.Play(); - break; - } - } - } - - public void DORewindAndPlayNext() - { - _playCount = -1; - DOTween.Rewind(this.gameObject); - DOPlayNext(); - } - - public void DORestartById(string id) - { - _playCount = -1; - DOTween.Restart(this.gameObject, id); - } - public void DORestartAllById(string id) - { - _playCount = -1; - DOTween.Restart(id); - } - - public List GetTweens() - { - return DOTween.TweensByTarget(this.gameObject); - } - - #endregion - - #endregion - - #region Private - - // Re-evaluate relative position of path - void ReEvaluateRelativeTween() - { - if (animationType == DOTweenAnimationType.Move) { - ((Tweener)tween).ChangeEndValue(transform.position + endValueV3, true); - } else if (animationType == DOTweenAnimationType.LocalMove) { - ((Tweener)tween).ChangeEndValue(transform.localPosition + endValueV3, true); - } - } - - #endregion - } - - public static class DOTweenAnimationExtensions - { - public static bool IsSameOrSubclassOf(this Type t, Type tBase) - { - return t.IsSubclassOf(tBase) || t == tBase; - } - } +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/12 15:55 + +using System; +using System.Collections.Generic; +using DG.Tweening.Core; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; + +#if DOTWEEN_TMP + using TMPro; +#endif + +#pragma warning disable 1591 +namespace DG.Tweening +{ + /// + /// Attach this to a GameObject to create a tween + /// + [AddComponentMenu("DOTween/DOTween Animation")] + public class DOTweenAnimation : ABSAnimationComponent + { + public float delay; + public float duration = 1; + public Ease easeType = Ease.OutQuad; + public AnimationCurve easeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)); + public LoopType loopType = LoopType.Restart; + public int loops = 1; + public string id = ""; + public bool isRelative; + public bool isFrom; + public bool isIndependentUpdate = false; + public bool autoKill = true; + + public bool isActive = true; + public bool isValid; + public Component target; + public DOTweenAnimationType animationType; + public bool autoPlay = true; + + public float endValueFloat; + public Vector3 endValueV3; + public Color endValueColor = new Color(1, 1, 1, 1); + public string endValueString = ""; + public Rect endValueRect = new Rect(0, 0, 0, 0); + + public bool optionalBool0; + public float optionalFloat0; + public int optionalInt0; + public RotateMode optionalRotationMode = RotateMode.Fast; + public ScrambleMode optionalScrambleMode = ScrambleMode.None; + public string optionalString; + + int _playCount = -1; // Used when calling DOPlayNext + + #region Unity Methods + + void Awake() + { + if (!isActive || !isValid) return; + + CreateTween(); + } + + void OnDestroy() + { + if (tween != null && tween.IsActive()) tween.Kill(); + tween = null; + } + + // Used also by DOTweenAnimationInspector when applying runtime changes and restarting + public void CreateTween() + { + if (target == null) { + Debug.LogWarning(string.Format("{0} :: This tween's target is NULL, because the animation was created with a DOTween Pro version older than 0.9.255. To fix this, exit Play mode then simply select this object, and it will update automatically", this.gameObject.name), this.gameObject); + return; + } + + Type t = target.GetType(); + +// Component c; + switch (animationType) { + case DOTweenAnimationType.None: + break; + case DOTweenAnimationType.Move: + if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOAnchorPos3D(endValueV3, duration, optionalBool0); + else if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOMove(endValueV3, duration, optionalBool0); + else if (t.IsSameOrSubclassOf(typeof(Rigidbody2D))) tween = ((Rigidbody2D)target).DOMove(endValueV3, duration, optionalBool0); + else if (t.IsSameOrSubclassOf(typeof(Rigidbody))) tween = ((Rigidbody)target).DOMove(endValueV3, duration, optionalBool0); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Rigidbody2D)c).DOMove(endValueV3, duration, optionalBool0); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Rigidbody)c).DOMove(endValueV3, duration, optionalBool0); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((RectTransform)c).DOAnchorPos3D(endValueV3, duration, optionalBool0); +// goto SetupTween; +// } +// tween = transform.DOMove(endValueV3, duration, optionalBool0); + break; + case DOTweenAnimationType.LocalMove: + tween = transform.DOLocalMove(endValueV3, duration, optionalBool0); + break; + case DOTweenAnimationType.Rotate: + if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DORotate(endValueV3, duration, optionalRotationMode); + else if (t.IsSameOrSubclassOf(typeof(Rigidbody2D))) tween = ((Rigidbody2D)target).DORotate(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(Rigidbody))) tween = ((Rigidbody)target).DORotate(endValueV3, duration, optionalRotationMode); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Rigidbody2D)c).DORotate(endValueFloat, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Rigidbody)c).DORotate(endValueV3, duration, optionalRotationMode); +// goto SetupTween; +// } +// tween = transform.DORotate(endValueV3, duration, optionalRotationMode); + break; + case DOTweenAnimationType.LocalRotate: + tween = transform.DOLocalRotate(endValueV3, duration, optionalRotationMode); + break; + case DOTweenAnimationType.Scale: + tween = transform.DOScale(optionalBool0 ? new Vector3(endValueFloat, endValueFloat, endValueFloat) : endValueV3, duration); + break; + case DOTweenAnimationType.Color: + isRelative = false; + if (t.IsSameOrSubclassOf(typeof(SpriteRenderer))) tween = ((SpriteRenderer)target).DOColor(endValueColor, duration); + else if (t.IsSameOrSubclassOf(typeof(Renderer))) tween = ((Renderer)target).material.DOColor(endValueColor, duration); + else if (t.IsSameOrSubclassOf(typeof(Image))) tween = ((Image)target).DOColor(endValueColor, duration); + else if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOColor(endValueColor, duration); +#if DOTWEEN_TK2D + else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOColor(endValueColor, duration); + else if (t.IsSameOrSubclassOf(typeof(tk2dBaseSprite))) tween = ((tk2dBaseSprite)target).DOColor(endValueColor, duration); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((tk2dBaseSprite)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } +#endif +#if DOTWEEN_TMP + else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOColor(endValueColor, duration); + else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOColor(endValueColor, duration); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshPro)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshProUGUI)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } +#endif +// c = this.GetComponent(); +// if (c != null) { +// tween = ((SpriteRenderer)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Renderer)c).material.DOColor(endValueColor, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Image)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Text)c).DOColor(endValueColor, duration); +// goto SetupTween; +// } + break; + case DOTweenAnimationType.Fade: + isRelative = false; + if (t.IsSameOrSubclassOf(typeof(SpriteRenderer))) tween = ((SpriteRenderer)target).DOFade(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(Renderer))) tween = ((Renderer)target).material.DOFade(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(Image))) tween = ((Image)target).DOFade(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOFade(endValueFloat, duration); +#if DOTWEEN_TK2D + else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOFade(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(tk2dBaseSprite))) tween = ((tk2dBaseSprite)target).DOFade(endValueFloat, duration); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((tk2dBaseSprite)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } +#endif +#if DOTWEEN_TMP + else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOFade(endValueFloat, duration); + else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOFade(endValueFloat, duration); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshPro)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshProUGUI)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } +#endif +// c = this.GetComponent(); +// if (c != null) { +// tween = ((SpriteRenderer)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Renderer)c).material.DOFade(endValueFloat, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Image)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Text)c).DOFade(endValueFloat, duration); +// goto SetupTween; +// } + break; + case DOTweenAnimationType.Text: + if (t.IsSameOrSubclassOf(typeof(Text))) tween = ((Text)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((Text)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// goto SetupTween; +// } +#if DOTWEEN_TK2D + else if (t.IsSameOrSubclassOf(typeof(tk2dTextMesh))) tween = ((tk2dTextMesh)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((tk2dTextMesh)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// goto SetupTween; +// } +#endif +#if DOTWEEN_TMP + else if (t.IsSameOrSubclassOf(typeof(TextMeshProUGUI))) tween = ((TextMeshProUGUI)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); + else if (t.IsSameOrSubclassOf(typeof(TextMeshPro))) tween = ((TextMeshPro)target).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshPro)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// goto SetupTween; +// } +// c = this.GetComponent(); +// if (c != null) { +// tween = ((TextMeshProUGUI)c).DOText(endValueString, duration, optionalBool0, optionalScrambleMode, optionalString); +// goto SetupTween; +// } +#endif + break; + case DOTweenAnimationType.PunchPosition: + if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOPunchAnchorPos(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); + else if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOPunchPosition(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); +// tween = transform.DOPunchPosition(endValueV3, duration, optionalInt0, optionalFloat0, optionalBool0); + break; + case DOTweenAnimationType.PunchScale: + tween = transform.DOPunchScale(endValueV3, duration, optionalInt0, optionalFloat0); + break; + case DOTweenAnimationType.PunchRotation: + tween = transform.DOPunchRotation(endValueV3, duration, optionalInt0, optionalFloat0); + break; + case DOTweenAnimationType.ShakePosition: + if (t.IsSameOrSubclassOf(typeof(RectTransform))) tween = ((RectTransform)target).DOShakeAnchorPos(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); + if (t.IsSameOrSubclassOf(typeof(Transform))) tween = ((Transform)target).DOShakePosition(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); +// tween = transform.DOShakePosition(duration, endValueV3, optionalInt0, optionalFloat0, optionalBool0); + break; + case DOTweenAnimationType.ShakeScale: + tween = transform.DOShakeScale(duration, endValueV3, optionalInt0, optionalFloat0); + break; + case DOTweenAnimationType.ShakeRotation: + tween = transform.DOShakeRotation(duration, endValueV3, optionalInt0, optionalFloat0); + break; + case DOTweenAnimationType.CameraAspect: + tween = ((Camera)target).DOAspect(endValueFloat, duration); + break; + case DOTweenAnimationType.CameraBackgroundColor: + tween = ((Camera)target).DOColor(endValueColor, duration); + break; + case DOTweenAnimationType.CameraFieldOfView: + tween = ((Camera)target).DOFieldOfView(endValueFloat, duration); + break; + case DOTweenAnimationType.CameraOrthoSize: + tween = ((Camera)target).DOOrthoSize(endValueFloat, duration); + break; + case DOTweenAnimationType.CameraPixelRect: + tween = ((Camera)target).DOPixelRect(endValueRect, duration); + break; + case DOTweenAnimationType.CameraRect: + tween = ((Camera)target).DORect(endValueRect, duration); + break; + } + +// SetupTween: + if (tween == null) return; + + if (isFrom) { + ((Tweener)tween).From(isRelative); + } else { + tween.SetRelative(isRelative); + } + tween.SetTarget(this.gameObject).SetDelay(delay).SetLoops(loops, loopType).SetAutoKill(autoKill) + .OnKill(()=> tween = null); + if (easeType == Ease.INTERNAL_Custom) tween.SetEase(easeCurve); + else tween.SetEase(easeType); + if (!string.IsNullOrEmpty(id)) tween.SetId(id); + tween.SetUpdate(isIndependentUpdate); + + if (hasOnStart) { + if (onStart != null) tween.OnStart(onStart.Invoke); + } else onStart = null; + if (hasOnPlay) { + if (onPlay != null) tween.OnPlay(onPlay.Invoke); + } else onPlay = null; + if (hasOnUpdate) { + if (onUpdate != null) tween.OnUpdate(onUpdate.Invoke); + } else onUpdate = null; + if (hasOnStepComplete) { + if (onStepComplete != null) tween.OnStepComplete(onStepComplete.Invoke); + } else onStepComplete = null; + if (hasOnComplete) { + if (onComplete != null) tween.OnComplete(onComplete.Invoke); + } else onComplete = null; + + if (autoPlay) tween.Play(); + else tween.Pause(); + } + + #endregion + + #region Public Methods + + // These methods are here so they can be called directly via Unity's UGUI event system + + public override void DOPlay() + { + DOTween.Play(this.gameObject); + } + + public override void DOPlayBackwards() + { + DOTween.PlayBackwards(this.gameObject); + } + + public override void DOPlayForward() + { + DOTween.PlayForward(this.gameObject); + } + + public override void DOPause() + { + DOTween.Pause(this.gameObject); + } + + public override void DOTogglePause() + { + DOTween.TogglePause(this.gameObject); + } + + public override void DORewind() + { + _playCount = -1; + // Rewind using Components order (in case there are multiple animations on the same property) + DOTweenAnimation[] anims = this.gameObject.GetComponents(); + for (int i = anims.Length - 1; i > -1; --i) { + Tween t = anims[i].tween; + if (t != null && t.IsInitialized()) anims[i].tween.Rewind(); + } + // DOTween.Rewind(this.gameObject); + } + + /// + /// Restarts the tween + /// + /// If TRUE, re-evaluates the tween's start and end values from its current position. + /// Set it to TRUE when spawning the same DOTweenAnimation in different positions (like when using a pooling system) + public override void DORestart(bool fromHere = false) + { + _playCount = -1; + if (tween == null) { + if (Debugger.logPriority > 1) Debugger.LogNullTween(tween); return; + } + if (fromHere && isRelative) ReEvaluateRelativeTween(); + DOTween.Restart(this.gameObject); + } + + public override void DOComplete() + { + DOTween.Complete(this.gameObject); + } + + public override void DOKill() + { + DOTween.Kill(this.gameObject); + tween = null; + } + + #region Specifics + + public void DOPlayById(string id) + { + DOTween.Play(this.gameObject, id); + } + public void DOPlayAllById(string id) + { + DOTween.Play(id); + } + + public void DOPlayNext() + { + DOTweenAnimation[] anims = this.GetComponents(); + while (_playCount < anims.Length - 1) { + _playCount++; + DOTweenAnimation anim = anims[_playCount]; + if (anim != null && anim.tween != null && !anim.tween.IsPlaying() && !anim.tween.IsComplete()) { + anim.tween.Play(); + break; + } + } + } + + public void DORewindAndPlayNext() + { + _playCount = -1; + DOTween.Rewind(this.gameObject); + DOPlayNext(); + } + + public void DORestartById(string id) + { + _playCount = -1; + DOTween.Restart(this.gameObject, id); + } + public void DORestartAllById(string id) + { + _playCount = -1; + DOTween.Restart(id); + } + + public List GetTweens() + { + return DOTween.TweensByTarget(this.gameObject); + } + + #endregion + + #endregion + + #region Private + + // Re-evaluate relative position of path + void ReEvaluateRelativeTween() + { + if (animationType == DOTweenAnimationType.Move) { + ((Tweener)tween).ChangeEndValue(transform.position + endValueV3, true); + } else if (animationType == DOTweenAnimationType.LocalMove) { + ((Tweener)tween).ChangeEndValue(transform.localPosition + endValueV3, true); + } + } + + #endregion + } + + public static class DOTweenAnimationExtensions + { + public static bool IsSameOrSubclassOf(this Type t, Type tBase) + { + return t.IsSubclassOf(tBase) || t == tBase; + } + } } \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenPro.XML b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenPro.XML index 6f5f6c86..c1528c5a 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenPro.XML +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenPro.XML @@ -1,71 +1,71 @@ - - - - DOTweenPro - - - - - Methods that extend known Unity objects and allow to directly create and control tweens from their instances - - - - Tweens a Transform's localPosition in a spiral shape. - Also stores the transform as the tween's target so it can be used for filtered operations - The duration of the tween - The axis around which the spiral will rotate - The type of spiral movement - Speed of the rotations - Frequency of the rotation. Lower values lead to wider spirals - Indicates how much the tween should move along the spiral's axis - If TRUE the tween will smoothly snap all values to integers - - - Tweens a Rigidbody's position in a spiral shape. - Also stores the transform as the tween's target so it can be used for filtered operations - The duration of the tween - The axis around which the spiral will rotate - The type of spiral movement - Speed of the rotations - Frequency of the rotation. Lower values lead to wider spirals - Indicates how much the tween should move along the spiral's axis - If TRUE the tween will smoothly snap all values to integers - - - - Tweens a Vector3 along a spiral. - EndValue represents the direction of the spiral - - - - - Restarts the tween - - If TRUE, re-evaluates the tween's start and end values from its current position. - Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) - - - - Attach this to a GameObject to create and assign a path to it - - - - - Restarts the tween - - If TRUE, re-evaluates the tween's start and end values from its current position. - Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) - - - - Spiral tween mode - - - - The spiral motion will expand outwards for the whole the tween - - - The spiral motion will expand outwards for half the tween and then will spiral back to the starting position - - - + + + + DOTweenPro + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances + + + + Tweens a Transform's localPosition in a spiral shape. + Also stores the transform as the tween's target so it can be used for filtered operations + The duration of the tween + The axis around which the spiral will rotate + The type of spiral movement + Speed of the rotations + Frequency of the rotation. Lower values lead to wider spirals + Indicates how much the tween should move along the spiral's axis + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's position in a spiral shape. + Also stores the transform as the tween's target so it can be used for filtered operations + The duration of the tween + The axis around which the spiral will rotate + The type of spiral movement + Speed of the rotations + Frequency of the rotation. Lower values lead to wider spirals + Indicates how much the tween should move along the spiral's axis + If TRUE the tween will smoothly snap all values to integers + + + + Tweens a Vector3 along a spiral. + EndValue represents the direction of the spiral + + + + + Restarts the tween + + If TRUE, re-evaluates the tween's start and end values from its current position. + Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) + + + + Attach this to a GameObject to create and assign a path to it + + + + + Restarts the tween + + If TRUE, re-evaluates the tween's start and end values from its current position. + Set it to TRUE when spawning the same DOTweenPath in different positions (like when using a pooling system) + + + + Spiral tween mode + + + + The spiral motion will expand outwards for the whole the tween + + + The spiral motion will expand outwards for half the tween and then will spiral back to the starting position + + + diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.addon b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.addon index 94239cad..59b0139c 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.addon +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTextMeshPro.cs.addon @@ -1,239 +1,239 @@ -// Author: Daniele Giardini - http://www.demigiant.com -// Created: 2015/03/27 19:02 -// -// License Copyright (c) Daniele Giardini. -// This work is subject to the terms at http://dotween.demigiant.com/license.php - -using UnityEngine; -using TMPro; - -namespace DG.Tweening -{ - /// - /// Methods that extend Text Mesh Pro objects and allow to directly create and control tweens from their instances. - /// - public static class ShortcutExtensionsTextMeshPro - { - #region Colors - - /// Tweens a TextMeshPro's color to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOColor(this TextMeshPro target, Color endValue, float duration) - { - return DOTween.To(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro's faceColor to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFaceColor(this TextMeshPro target, Color32 endValue, float duration) - { - return DOTween.To(() => target.faceColor, x => target.faceColor = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro's outlineColor to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOOutlineColor(this TextMeshPro target, Color32 endValue, float duration) - { - return DOTween.To(() => target.outlineColor, x => target.outlineColor = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro's glow color to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - /// If TRUE will use the fontSharedMaterial instead than the fontMaterial - public static Tweener DOGlowColor(this TextMeshPro target, Color endValue, float duration, bool useSharedMaterial = false) - { - return useSharedMaterial - ? target.fontSharedMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target) - : target.fontMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target); - } - - /// Tweens a TextMeshPro's alpha color to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFade(this TextMeshPro target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro faceColor's alpha to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFaceFade(this TextMeshPro target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration) - .SetTarget(target); - } - - #endregion - - #region Other - - /// Tweens a TextMeshPro's scale to the given value (using correct uniform scale as TMP requires). - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScale(this TextMeshPro target, float endValue, float duration) - { - Transform t = target.transform; - Vector3 endValueV3 = new Vector3(endValue, endValue, endValue); - return DOTween.To(() => t.localScale, x => t.localScale = x, endValueV3, duration).SetTarget(target); - } - - /// Tweens a TextMeshPro's fontSize to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFontSize(this TextMeshPro target, float endValue, float duration) - { - return DOTween.To(() => target.fontSize, x => target.fontSize = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro's maxVisibleCharacters to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOMaxVisibleCharacters(this TextMeshPro target, int endValue, float duration) - { - return DOTween.To(() => target.maxVisibleCharacters, x => target.maxVisibleCharacters = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshPro's text to the given value. - /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations - /// The end string to tween toThe duration of the tween - /// If TRUE (default), rich text will be interpreted correctly while animated, - /// otherwise all tags will be considered as normal text - /// The type of scramble mode to use, if any - /// A string containing the characters to use for scrambling. - /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. - /// Leave it to NULL (default) to use default ones - public static Tweener DOText(this TextMeshPro target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) - { - return DOTween.To(() => target.text, x => target.text = x, endValue, duration) - .SetOptions(richTextEnabled, scrambleMode, scrambleChars) - .SetTarget(target); - } - - #endregion - } - - /// - /// Methods that extend Text Mesh Pro objects and allow to directly create and control tweens from their instances. - /// - public static class ShortcutExtensionsTextMeshProUGUI - { - #region Colors - - /// Tweens a TextMeshProUGUI's color to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOColor(this TextMeshProUGUI target, Color endValue, float duration) - { - return DOTween.To(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's faceColor to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFaceColor(this TextMeshProUGUI target, Color32 endValue, float duration) - { - return DOTween.To(() => target.faceColor, x => target.faceColor = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's outlineColor to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOOutlineColor(this TextMeshProUGUI target, Color32 endValue, float duration) - { - return DOTween.To(() => target.outlineColor, x => target.outlineColor = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's glow color to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - /// If TRUE will use the fontSharedMaterial instead than the fontMaterial - public static Tweener DOGlowColor(this TextMeshProUGUI target, Color endValue, float duration, bool useSharedMaterial = false) - { - return useSharedMaterial - ? target.fontSharedMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target) - : target.fontMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's alpha color to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFade(this TextMeshProUGUI target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI faceColor's alpha to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFaceFade(this TextMeshProUGUI target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration) - .SetTarget(target); - } - - #endregion - - #region Other - - /// Tweens a TextMeshProUGUI's scale to the given value (using correct uniform scale as TMP requires). - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScale(this TextMeshProUGUI target, float endValue, float duration) - { - Transform t = target.transform; - Vector3 endValueV3 = new Vector3(endValue, endValue, endValue); - return DOTween.To(() => t.localScale, x => t.localScale = x, endValueV3, duration).SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's fontSize to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFontSize(this TextMeshProUGUI target, float endValue, float duration) - { - return DOTween.To(() => target.fontSize, x => target.fontSize = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's maxVisibleCharacters to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOMaxVisibleCharacters(this TextMeshProUGUI target, int endValue, float duration) - { - return DOTween.To(() => target.maxVisibleCharacters, x => target.maxVisibleCharacters = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a TextMeshProUGUI's text to the given value. - /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations - /// The end string to tween toThe duration of the tween - /// If TRUE (default), rich text will be interpreted correctly while animated, - /// otherwise all tags will be considered as normal text - /// The type of scramble mode to use, if any - /// A string containing the characters to use for scrambling. - /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. - /// Leave it to NULL (default) to use default ones - public static Tweener DOText(this TextMeshProUGUI target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) - { - return DOTween.To(() => target.text, x => target.text = x, endValue, duration) - .SetOptions(richTextEnabled, scrambleMode, scrambleChars) - .SetTarget(target); - } - - #endregion - } +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/27 19:02 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + +using UnityEngine; +using TMPro; + +namespace DG.Tweening +{ + /// + /// Methods that extend Text Mesh Pro objects and allow to directly create and control tweens from their instances. + /// + public static class ShortcutExtensionsTextMeshPro + { + #region Colors + + /// Tweens a TextMeshPro's color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOColor(this TextMeshPro target, Color endValue, float duration) + { + return DOTween.To(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro's faceColor to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFaceColor(this TextMeshPro target, Color32 endValue, float duration) + { + return DOTween.To(() => target.faceColor, x => target.faceColor = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro's outlineColor to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOOutlineColor(this TextMeshPro target, Color32 endValue, float duration) + { + return DOTween.To(() => target.outlineColor, x => target.outlineColor = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro's glow color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE will use the fontSharedMaterial instead than the fontMaterial + public static Tweener DOGlowColor(this TextMeshPro target, Color endValue, float duration, bool useSharedMaterial = false) + { + return useSharedMaterial + ? target.fontSharedMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target) + : target.fontMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target); + } + + /// Tweens a TextMeshPro's alpha color to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFade(this TextMeshPro target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro faceColor's alpha to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFaceFade(this TextMeshPro target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration) + .SetTarget(target); + } + + #endregion + + #region Other + + /// Tweens a TextMeshPro's scale to the given value (using correct uniform scale as TMP requires). + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScale(this TextMeshPro target, float endValue, float duration) + { + Transform t = target.transform; + Vector3 endValueV3 = new Vector3(endValue, endValue, endValue); + return DOTween.To(() => t.localScale, x => t.localScale = x, endValueV3, duration).SetTarget(target); + } + + /// Tweens a TextMeshPro's fontSize to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFontSize(this TextMeshPro target, float endValue, float duration) + { + return DOTween.To(() => target.fontSize, x => target.fontSize = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro's maxVisibleCharacters to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOMaxVisibleCharacters(this TextMeshPro target, int endValue, float duration) + { + return DOTween.To(() => target.maxVisibleCharacters, x => target.maxVisibleCharacters = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshPro's text to the given value. + /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static Tweener DOText(this TextMeshPro target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + return DOTween.To(() => target.text, x => target.text = x, endValue, duration) + .SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + } + + #endregion + } + + /// + /// Methods that extend Text Mesh Pro objects and allow to directly create and control tweens from their instances. + /// + public static class ShortcutExtensionsTextMeshProUGUI + { + #region Colors + + /// Tweens a TextMeshProUGUI's color to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOColor(this TextMeshProUGUI target, Color endValue, float duration) + { + return DOTween.To(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's faceColor to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFaceColor(this TextMeshProUGUI target, Color32 endValue, float duration) + { + return DOTween.To(() => target.faceColor, x => target.faceColor = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's outlineColor to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOOutlineColor(this TextMeshProUGUI target, Color32 endValue, float duration) + { + return DOTween.To(() => target.outlineColor, x => target.outlineColor = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's glow color to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + /// If TRUE will use the fontSharedMaterial instead than the fontMaterial + public static Tweener DOGlowColor(this TextMeshProUGUI target, Color endValue, float duration, bool useSharedMaterial = false) + { + return useSharedMaterial + ? target.fontSharedMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target) + : target.fontMaterial.DOColor(endValue, "_GlowColor", duration).SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's alpha color to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFade(this TextMeshProUGUI target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI faceColor's alpha to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFaceFade(this TextMeshProUGUI target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration) + .SetTarget(target); + } + + #endregion + + #region Other + + /// Tweens a TextMeshProUGUI's scale to the given value (using correct uniform scale as TMP requires). + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScale(this TextMeshProUGUI target, float endValue, float duration) + { + Transform t = target.transform; + Vector3 endValueV3 = new Vector3(endValue, endValue, endValue); + return DOTween.To(() => t.localScale, x => t.localScale = x, endValueV3, duration).SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's fontSize to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFontSize(this TextMeshProUGUI target, float endValue, float duration) + { + return DOTween.To(() => target.fontSize, x => target.fontSize = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's maxVisibleCharacters to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOMaxVisibleCharacters(this TextMeshProUGUI target, int endValue, float duration) + { + return DOTween.To(() => target.maxVisibleCharacters, x => target.maxVisibleCharacters = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a TextMeshProUGUI's text to the given value. + /// Also stores the TextMeshProUGUI as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static Tweener DOText(this TextMeshProUGUI target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + return DOTween.To(() => target.text, x => target.text = x, endValue, duration) + .SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + } + + #endregion + } } \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTk2d.cs.addon b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTk2d.cs.addon index f5e5ef17..9c18d658 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTk2d.cs.addon +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/DOTweenTk2d.cs.addon @@ -1,143 +1,143 @@ -// Author: Daniele Giardini - http://www.demigiant.com -// Created: 2014/10/27 15:59 -// -// License Copyright (c) Daniele Giardini. -// This work is subject to the terms at http://dotween.demigiant.com/license.php - -using UnityEngine; - -namespace DG.Tweening -{ - /// - /// Methods that extend 2D Toolkit objects and allow to directly create and control tweens from their instances. - /// - public static class ShortcutExtensionsTk2d - { - #region Sprite - - /// Tweens a 2D Toolkit Sprite's dimensions to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScale(this tk2dBaseSprite target, Vector3 endValue, float duration) - { - return DOTween.To(() => target.scale, x => target.scale = x, endValue, duration) - .SetTarget(target); - } - /// Tweens a Sprite's dimensions to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScaleX(this tk2dBaseSprite target, float endValue, float duration) - { - return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(endValue, 0, 0), duration) - .SetOptions(AxisConstraint.X) - .SetTarget(target); - } - /// Tweens a Sprite's dimensions to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScaleY(this tk2dBaseSprite target, float endValue, float duration) - { - return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, endValue, 0), duration) - .SetOptions(AxisConstraint.Y) - .SetTarget(target); - } - /// Tweens a Sprite's dimensions to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScaleZ(this tk2dBaseSprite target, float endValue, float duration) - { - return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, 0, endValue), duration) - .SetOptions(AxisConstraint.Z) - .SetTarget(target); - } - - /// Tweens a 2D Toolkit Sprite's color to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOColor(this tk2dBaseSprite target, Color endValue, float duration) - { - return DOTween.To(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a 2D Toolkit Sprite's alpha color to the given value. - /// Also stores the Sprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFade(this tk2dBaseSprite target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - #endregion - - #region tk2dSlicedSprite - - /// Tweens a 2D Toolkit SlicedSprite's dimensions to the given value. - /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScale(this tk2dSlicedSprite target, Vector2 endValue, float duration) - { - return DOTween.To(() => target.dimensions, x => target.dimensions = x, endValue, duration) - .SetTarget(target); - } - /// Tweens a SlicedSprite's dimensions to the given value. - /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScaleX(this tk2dSlicedSprite target, float endValue, float duration) - { - return DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(endValue, 0), duration) - .SetOptions(AxisConstraint.X) - .SetTarget(target); - } - /// Tweens a SlicedSprite's dimensions to the given value. - /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOScaleY(this tk2dSlicedSprite target, float endValue, float duration) - { - return DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(0, endValue), duration) - .SetOptions(AxisConstraint.Y) - .SetTarget(target); - } - - #endregion - - #region TextMesh - - /// Tweens a 2D Toolkit TextMesh's color to the given value. - /// Also stores the TextMesh as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOColor(this tk2dTextMesh target, Color endValue, float duration) - { - return DOTween.To(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a 2D Toolkit TextMesh's alpha color to the given value. - /// Also stores the TextMesh as the tween's target so it can be used for filtered operations - /// The end value to reachThe duration of the tween - public static Tweener DOFade(this tk2dTextMesh target, float endValue, float duration) - { - return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) - .SetTarget(target); - } - - /// Tweens a tk2dTextMesh's text to the given value. - /// Also stores the tk2dTextMesh as the tween's target so it can be used for filtered operations - /// The end string to tween toThe duration of the tween - /// If TRUE (default), rich text will be interpreted correctly while animated, - /// otherwise all tags will be considered as normal text - /// The type of scramble mode to use, if any - /// A string containing the characters to use for scrambling. - /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. - /// Leave it to NULL (default) to use default ones - public static Tweener DOText(this tk2dTextMesh target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) - { - return DOTween.To(() => target.text, x => target.text = x, endValue, duration) - .SetOptions(richTextEnabled, scrambleMode, scrambleChars) - .SetTarget(target); - } - - #endregion - } +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2014/10/27 15:59 +// +// License Copyright (c) Daniele Giardini. +// This work is subject to the terms at http://dotween.demigiant.com/license.php + +using UnityEngine; + +namespace DG.Tweening +{ + /// + /// Methods that extend 2D Toolkit objects and allow to directly create and control tweens from their instances. + /// + public static class ShortcutExtensionsTk2d + { + #region Sprite + + /// Tweens a 2D Toolkit Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScale(this tk2dBaseSprite target, Vector3 endValue, float duration) + { + return DOTween.To(() => target.scale, x => target.scale = x, endValue, duration) + .SetTarget(target); + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScaleX(this tk2dBaseSprite target, float endValue, float duration) + { + return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(endValue, 0, 0), duration) + .SetOptions(AxisConstraint.X) + .SetTarget(target); + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScaleY(this tk2dBaseSprite target, float endValue, float duration) + { + return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, endValue, 0), duration) + .SetOptions(AxisConstraint.Y) + .SetTarget(target); + } + /// Tweens a Sprite's dimensions to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScaleZ(this tk2dBaseSprite target, float endValue, float duration) + { + return DOTween.To(() => target.scale, x => target.scale = x, new Vector3(0, 0, endValue), duration) + .SetOptions(AxisConstraint.Z) + .SetTarget(target); + } + + /// Tweens a 2D Toolkit Sprite's color to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOColor(this tk2dBaseSprite target, Color endValue, float duration) + { + return DOTween.To(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a 2D Toolkit Sprite's alpha color to the given value. + /// Also stores the Sprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFade(this tk2dBaseSprite target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + #endregion + + #region tk2dSlicedSprite + + /// Tweens a 2D Toolkit SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScale(this tk2dSlicedSprite target, Vector2 endValue, float duration) + { + return DOTween.To(() => target.dimensions, x => target.dimensions = x, endValue, duration) + .SetTarget(target); + } + /// Tweens a SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScaleX(this tk2dSlicedSprite target, float endValue, float duration) + { + return DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(endValue, 0), duration) + .SetOptions(AxisConstraint.X) + .SetTarget(target); + } + /// Tweens a SlicedSprite's dimensions to the given value. + /// Also stores the SlicedSprite as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOScaleY(this tk2dSlicedSprite target, float endValue, float duration) + { + return DOTween.To(() => target.dimensions, x => target.dimensions = x, new Vector2(0, endValue), duration) + .SetOptions(AxisConstraint.Y) + .SetTarget(target); + } + + #endregion + + #region TextMesh + + /// Tweens a 2D Toolkit TextMesh's color to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOColor(this tk2dTextMesh target, Color endValue, float duration) + { + return DOTween.To(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a 2D Toolkit TextMesh's alpha color to the given value. + /// Also stores the TextMesh as the tween's target so it can be used for filtered operations + /// The end value to reachThe duration of the tween + public static Tweener DOFade(this tk2dTextMesh target, float endValue, float duration) + { + return DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) + .SetTarget(target); + } + + /// Tweens a tk2dTextMesh's text to the given value. + /// Also stores the tk2dTextMesh as the tween's target so it can be used for filtered operations + /// The end string to tween toThe duration of the tween + /// If TRUE (default), rich text will be interpreted correctly while animated, + /// otherwise all tags will be considered as normal text + /// The type of scramble mode to use, if any + /// A string containing the characters to use for scrambling. + /// Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + /// Leave it to NULL (default) to use default ones + public static Tweener DOText(this tk2dTextMesh target, string endValue, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) + { + return DOTween.To(() => target.text, x => target.text = x, endValue, duration) + .SetOptions(richTextEnabled, scrambleMode, scrambleChars) + .SetTarget(target); + } + + #endregion + } } \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs b/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs index 168b025e..dc42eb35 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenAnimationInspector.cs @@ -1,453 +1,453 @@ -// Author: Daniele Giardini - http://www.demigiant.com -// Created: 2015/03/12 16:03 - -using System; -using System.Collections.Generic; -using System.IO; -using DG.DemiEditor; -using DG.DOTweenEditor.Core; -using DG.Tweening; -using DG.Tweening.Core; -using UnityEditor; -using UnityEngine; -using UnityEngine.UI; - -#if DOTWEEN_TMP - using TMPro; -#endif - -namespace DG.DOTweenEditor -{ - [CustomEditor(typeof(DOTweenAnimation))] - public class DOTweenAnimationInspector : ABSAnimationInspector - { - static readonly Dictionary _AnimationTypeToComponent = new Dictionary() { - { DOTweenAnimationType.Move, new[] { typeof(Rigidbody), typeof(Rigidbody2D), typeof(RectTransform), typeof(Transform) } }, - { DOTweenAnimationType.LocalMove, new[] { typeof(Transform) } }, - { DOTweenAnimationType.Rotate, new[] { typeof(Rigidbody), typeof(Rigidbody2D), typeof(Transform) } }, - { DOTweenAnimationType.LocalRotate, new[] { typeof(Transform) } }, - { DOTweenAnimationType.Scale, new[] { typeof(Transform) } }, - { DOTweenAnimationType.Color, new[] { typeof(SpriteRenderer), typeof(Renderer), typeof(Image), typeof(Text) } }, - { DOTweenAnimationType.Fade, new[] { typeof(SpriteRenderer), typeof(Renderer), typeof(Image), typeof(Text) } }, - { DOTweenAnimationType.Text, new[] { typeof(Text) } }, - { DOTweenAnimationType.PunchPosition, new[] { typeof(RectTransform), typeof(Transform) } }, - { DOTweenAnimationType.PunchRotation, new[] { typeof(Transform) } }, - { DOTweenAnimationType.PunchScale, new[] { typeof(Transform) } }, - { DOTweenAnimationType.ShakePosition, new[] { typeof(RectTransform), typeof(Transform) } }, - { DOTweenAnimationType.ShakeRotation, new[] { typeof(Transform) } }, - { DOTweenAnimationType.ShakeScale, new[] { typeof(Transform) } }, - { DOTweenAnimationType.CameraAspect, new[] { typeof(Camera) } }, - { DOTweenAnimationType.CameraBackgroundColor, new[] { typeof(Camera) } }, - { DOTweenAnimationType.CameraFieldOfView, new[] { typeof(Camera) } }, - { DOTweenAnimationType.CameraOrthoSize, new[] { typeof(Camera) } }, - { DOTweenAnimationType.CameraPixelRect, new[] { typeof(Camera) } }, - { DOTweenAnimationType.CameraRect, new[] { typeof(Camera) } }, - }; - -#if DOTWEEN_TK2D - static readonly Dictionary _Tk2dAnimationTypeToComponent = new Dictionary() { - { DOTweenAnimationType.Color, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, - { DOTweenAnimationType.Fade, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, - { DOTweenAnimationType.Text, new[] { typeof(tk2dTextMesh) } } - }; -#endif -#if DOTWEEN_TMP - static readonly Dictionary _TMPAnimationTypeToComponent = new Dictionary() { - { DOTweenAnimationType.Color, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, - { DOTweenAnimationType.Fade, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, - { DOTweenAnimationType.Text, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } } - }; -#endif - - static readonly string[] _AnimationType = new[] { - "None", - "Move", "LocalMove", - "Rotate", "LocalRotate", - "Scale", - "Color", "Fade", - "Text", - "Punch/Position", "Punch/Rotation", "Punch/Scale", - "Shake/Position", "Shake/Rotation", "Shake/Scale", - "Camera/Aspect", "Camera/BackgroundColor", "Camera/FieldOfView", "Camera/OrthoSize", "Camera/PixelRect", "Camera/Rect" - }; - static string[] _animationTypeNoSlashes; // _AnimationType list without slashes in values - static string[] _datString; // String representation of DOTweenAnimation enum (here for caching reasons) - - DOTweenAnimation _src; - bool _runtimeEditMode; // If TRUE allows to change and save stuff at runtime - int _totComponentsOnSrc; // Used to determine if a Component is added or removed from the source - - // =================================================================================== - // MONOBEHAVIOUR METHODS ------------------------------------------------------------- - - void OnEnable() - { - _src = target as DOTweenAnimation; - - onStartProperty = base.serializedObject.FindProperty("onStart"); - onPlayProperty = base.serializedObject.FindProperty("onPlay"); - onUpdateProperty = base.serializedObject.FindProperty("onUpdate"); - onStepCompleteProperty = base.serializedObject.FindProperty("onStepComplete"); - onCompleteProperty = base.serializedObject.FindProperty("onComplete"); - - // Convert _AnimationType to _animationTypeNoSlashes - int len = _AnimationType.Length; - _animationTypeNoSlashes = new string[len]; - for (int i = 0; i < len; ++i) { - string a = _AnimationType[i]; - a = a.Replace("/", ""); - _animationTypeNoSlashes[i] = a; - } - } - - override public void OnInspectorGUI() - { - base.OnInspectorGUI(); - - GUILayout.Space(3); - EditorGUIUtils.SetGUIStyles(); - - bool playMode = Application.isPlaying; - _runtimeEditMode = _runtimeEditMode && playMode; - - GUILayout.BeginHorizontal(); - EditorGUIUtils.InspectorLogo(); - GUILayout.Label(_src.animationType.ToString() + (string.IsNullOrEmpty(_src.id) ? "" : " [" + _src.id + "]"), EditorGUIUtils.sideLogoIconBoldLabelStyle); - // Up-down buttons - GUILayout.FlexibleSpace(); - if (GUILayout.Button("▲", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentUp(_src); - if (GUILayout.Button("▼", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentDown(_src); - GUILayout.EndHorizontal(); - - if (playMode) { - if (_runtimeEditMode) { - - } else { - GUILayout.Space(8); - GUILayout.Label("Animation Editor disabled while in play mode", EditorGUIUtils.wordWrapLabelStyle); - if (!_src.isActive) { - GUILayout.Label("This animation has been toggled as inactive and won't be generated", EditorGUIUtils.wordWrapLabelStyle); - GUI.enabled = false; - } - if (GUILayout.Button(new GUIContent("Activate Edit Mode", "Switches to Runtime Edit Mode, where you can change animations values and restart them"))) { - _runtimeEditMode = true; - } - GUILayout.Label("NOTE: when using DOPlayNext, the sequence is determined by the DOTweenAnimation Components order in the target GameObject's Inspector", EditorGUIUtils.wordWrapLabelStyle); - GUILayout.Space(10); - if (!_runtimeEditMode) return; - } - } - - Undo.RecordObject(_src, "DOTween Animation"); - -// _src.isValid = Validate(); // Moved down - - EditorGUIUtility.labelWidth = 120; - - if (playMode) { - GUILayout.Space(4); - DeGUILayout.Toolbar("Edit Mode Commands"); - DeGUILayout.BeginVBox(DeGUI.styles.box.stickyTop); - GUILayout.BeginHorizontal(); - if (GUILayout.Button("TogglePause")) _src.tween.TogglePause(); - if (GUILayout.Button("Rewind")) _src.tween.Rewind(); - if (GUILayout.Button("Restart")) _src.tween.Restart(); - GUILayout.EndHorizontal(); - if (GUILayout.Button("Commit changes and restart")) { - _src.tween.Rewind(); - _src.tween.Kill(); - if (_src.isValid) { - _src.CreateTween(); - _src.tween.Play(); - } - } - GUILayout.Label("To apply your changes when exiting Play mode, use the Component's upper right menu and choose \"Copy Component\", then \"Paste Component Values\" after exiting Play mode", DeGUI.styles.label.wordwrap); - DeGUILayout.EndVBox(); - } else { - bool hasManager = _src.GetComponent() != null; - if (!hasManager) { - if (GUILayout.Button(new GUIContent("Add Manager", "Adds a manager component which allows you to choose additional options for this gameObject"))) { - _src.gameObject.AddComponent(); - } - } - } - - GUILayout.BeginHorizontal(); - DOTweenAnimationType prevAnimType = _src.animationType; -// _src.animationType = (DOTweenAnimationType)EditorGUILayout.EnumPopup(_src.animationType, EditorGUIUtils.popupButton); - _src.isActive = EditorGUILayout.Toggle(new GUIContent("", "If unchecked, this animation will not be created"), _src.isActive, GUILayout.Width(16)); - GUI.enabled = _src.isActive; - _src.animationType = AnimationToDOTweenAnimationType(_AnimationType[EditorGUILayout.Popup(DOTweenAnimationTypeToPopupId(_src.animationType), _AnimationType)]); - _src.autoPlay = DeGUILayout.ToggleButton(_src.autoPlay, new GUIContent("AutoPlay", "If selected, the tween will play automatically")); - _src.autoKill = DeGUILayout.ToggleButton(_src.autoKill, new GUIContent("AutoKill", "If selected, the tween will be killed when it completes, and won't be reusable")); - GUILayout.EndHorizontal(); - if (prevAnimType != _src.animationType) { - // Set default optional values based on animation type - switch (_src.animationType) { - case DOTweenAnimationType.Move: - case DOTweenAnimationType.LocalMove: - case DOTweenAnimationType.Rotate: - case DOTweenAnimationType.LocalRotate: - case DOTweenAnimationType.Scale: - _src.endValueV3 = Vector3.zero; - _src.endValueFloat = 0; - _src.optionalBool0 = _src.animationType == DOTweenAnimationType.Scale; - break; - case DOTweenAnimationType.Color: - case DOTweenAnimationType.Fade: - _src.endValueFloat = 0; - break; - case DOTweenAnimationType.Text: - _src.optionalBool0 = true; - break; - case DOTweenAnimationType.PunchPosition: - case DOTweenAnimationType.PunchRotation: - case DOTweenAnimationType.PunchScale: - _src.endValueV3 = _src.animationType == DOTweenAnimationType.PunchRotation ? new Vector3(0,180,0) : Vector3.one; - _src.optionalFloat0 = 1; - _src.optionalInt0 = 10; - _src.optionalBool0 = false; - break; - case DOTweenAnimationType.ShakePosition: - case DOTweenAnimationType.ShakeRotation: - case DOTweenAnimationType.ShakeScale: - _src.endValueV3 = _src.animationType == DOTweenAnimationType.ShakeRotation ? new Vector3(90,90,90) : Vector3.one; - _src.optionalInt0 = 10; - _src.optionalFloat0 = 90; - _src.optionalBool0 = false; - break; - case DOTweenAnimationType.CameraAspect: - case DOTweenAnimationType.CameraFieldOfView: - case DOTweenAnimationType.CameraOrthoSize: - _src.endValueFloat = 0; - break; - case DOTweenAnimationType.CameraPixelRect: - case DOTweenAnimationType.CameraRect: - _src.endValueRect = new Rect(0, 0, 0, 0); - break; - } - } - if (_src.animationType == DOTweenAnimationType.None) { - _src.isValid = false; - if (GUI.changed) EditorUtility.SetDirty(_src); - return; - } - - if (prevAnimType != _src.animationType || ComponentsChanged()) { - _src.isValid = Validate(); - } - - if (!_src.isValid) { - GUI.color = Color.red; - GUILayout.BeginVertical(GUI.skin.box); - GUILayout.Label("No valid Component was found for the selected animation", EditorGUIUtils.wordWrapLabelStyle); - GUILayout.EndVertical(); - GUI.color = Color.white; - if (GUI.changed) EditorUtility.SetDirty(_src); - return; - } - - _src.duration = EditorGUILayout.FloatField("Duration", _src.duration); - if (_src.duration < 0) _src.duration = 0; - _src.delay = EditorGUILayout.FloatField("Delay", _src.delay); - if (_src.delay < 0) _src.delay = 0; - _src.isIndependentUpdate = EditorGUILayout.Toggle("Ignore TimeScale", _src.isIndependentUpdate); - _src.easeType = EditorGUIUtils.FilteredEasePopup(_src.easeType); - if (_src.easeType == Ease.INTERNAL_Custom) { - _src.easeCurve = EditorGUILayout.CurveField(" Ease Curve", _src.easeCurve); - } - _src.loops = EditorGUILayout.IntField(new GUIContent("Loops", "Set to -1 for infinite loops"), _src.loops); - if (_src.loops < -1) _src.loops = -1; - if (_src.loops > 1 || _src.loops == -1) - _src.loopType = (LoopType)EditorGUILayout.EnumPopup(" Loop Type", _src.loopType); - _src.id = EditorGUILayout.TextField("ID", _src.id); - - bool canBeRelative = true; - // End value and eventual specific options - switch (_src.animationType) { - case DOTweenAnimationType.Move: - case DOTweenAnimationType.LocalMove: - GUIEndValueV3(); - _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); - break; - case DOTweenAnimationType.Rotate: - case DOTweenAnimationType.LocalRotate: - if (_src.GetComponent()) GUIEndValueFloat(); - else { - GUIEndValueV3(); - _src.optionalRotationMode = (RotateMode)EditorGUILayout.EnumPopup(" Rotation Mode", _src.optionalRotationMode); - } - break; - case DOTweenAnimationType.Scale: - if (_src.optionalBool0) GUIEndValueFloat(); - else GUIEndValueV3(); - _src.optionalBool0 = EditorGUILayout.Toggle("Uniform Scale", _src.optionalBool0); - break; - case DOTweenAnimationType.Color: - GUIEndValueColor(); - canBeRelative = false; - break; - case DOTweenAnimationType.Fade: - GUIEndValueFloat(); - if (_src.endValueFloat < 0) _src.endValueFloat = 0; - if (_src.endValueFloat > 1) _src.endValueFloat = 1; - canBeRelative = false; - break; - case DOTweenAnimationType.Text: - GUIEndValueString(); - _src.optionalBool0 = EditorGUILayout.Toggle("Rich Text Enabled", _src.optionalBool0); - _src.optionalScrambleMode = (ScrambleMode)EditorGUILayout.EnumPopup("Scramble Mode", _src.optionalScrambleMode); - _src.optionalString = EditorGUILayout.TextField(new GUIContent("Custom Scramble", "Custom characters to use in case of ScrambleMode.Custom"), _src.optionalString); - break; - case DOTweenAnimationType.PunchPosition: - case DOTweenAnimationType.PunchRotation: - case DOTweenAnimationType.PunchScale: - GUIEndValueV3(); - canBeRelative = false; - _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the punch vibrate"), _src.optionalInt0, 1, 50); - _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Elasticity", "How much the vector will go beyond the starting position when bouncing backwards"), _src.optionalFloat0, 0, 1); - if (_src.animationType == DOTweenAnimationType.PunchPosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); - break; - case DOTweenAnimationType.ShakePosition: - case DOTweenAnimationType.ShakeRotation: - case DOTweenAnimationType.ShakeScale: - GUIEndValueV3(); - canBeRelative = false; - _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the shake vibrate"), _src.optionalInt0, 1, 50); - _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Randomness", "The shake randomness"), _src.optionalFloat0, 0, 90); - if (_src.animationType == DOTweenAnimationType.ShakePosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); - break; - case DOTweenAnimationType.CameraAspect: - case DOTweenAnimationType.CameraFieldOfView: - case DOTweenAnimationType.CameraOrthoSize: - GUIEndValueFloat(); - canBeRelative = false; - break; - case DOTweenAnimationType.CameraBackgroundColor: - GUIEndValueColor(); - canBeRelative = false; - break; - case DOTweenAnimationType.CameraPixelRect: - case DOTweenAnimationType.CameraRect: - GUIEndValueRect(); - canBeRelative = false; - break; - } - - // Final settings - if (canBeRelative) _src.isRelative = EditorGUILayout.Toggle(" Relative", _src.isRelative); - - // Events - AnimationInspectorGUI.AnimationEvents(this, _src); - - if (GUI.changed) EditorUtility.SetDirty(_src); - } - - // Returns TRUE if the Component layout on the src gameObject changed (a Component was added or removed) - bool ComponentsChanged() - { - int prevTotComponentsOnSrc = _totComponentsOnSrc; - _totComponentsOnSrc = _src.gameObject.GetComponents().Length; - return prevTotComponentsOnSrc != _totComponentsOnSrc; - } - - // Checks if a Component that can be animated with the given animationType is attached to the src - bool Validate() - { - if (_src.animationType == DOTweenAnimationType.None) return false; - - Component srcTarget; - // First check for external plugins -#if DOTWEEN_TK2D - if (_Tk2dAnimationTypeToComponent.ContainsKey(_src.animationType)) { - foreach (Type t in _Tk2dAnimationTypeToComponent[_src.animationType]) { - srcTarget = _src.GetComponent(t); - if (srcTarget != null) { - _src.target = srcTarget; - return true; - } - } - } -#endif -#if DOTWEEN_TMP - if (_TMPAnimationTypeToComponent.ContainsKey(_src.animationType)) { - foreach (Type t in _TMPAnimationTypeToComponent[_src.animationType]) { - srcTarget = _src.GetComponent(t); - if (srcTarget != null) { - _src.target = srcTarget; - return true; - } - } - } -#endif - // Then check for regular stuff - if (_AnimationTypeToComponent.ContainsKey(_src.animationType)) { - foreach (Type t in _AnimationTypeToComponent[_src.animationType]) { - srcTarget = _src.GetComponent(t); - if (srcTarget != null) { - _src.target = srcTarget; - return true; - } - } - } - return false; - } - - DOTweenAnimationType AnimationToDOTweenAnimationType(string animation) - { - if (_datString == null) _datString = Enum.GetNames(typeof(DOTweenAnimationType)); - animation = animation.Replace("/", ""); - return (DOTweenAnimationType)(Array.IndexOf(_datString, animation)); - } - int DOTweenAnimationTypeToPopupId(DOTweenAnimationType animation) - { - return Array.IndexOf(_animationTypeNoSlashes, animation.ToString()); - } - - void GUIEndValueFloat() - { - GUILayout.BeginHorizontal(); - GUIToFromButton(); - _src.endValueFloat = EditorGUILayout.FloatField(_src.endValueFloat); - GUILayout.EndHorizontal(); - } - - void GUIEndValueColor() - { - GUILayout.BeginHorizontal(); - GUIToFromButton(); - _src.endValueColor = EditorGUILayout.ColorField(_src.endValueColor); - GUILayout.EndHorizontal(); - } - - void GUIEndValueV3() - { - GUILayout.BeginHorizontal(); - GUIToFromButton(); - _src.endValueV3 = EditorGUILayout.Vector3Field("", _src.endValueV3, GUILayout.Height(16)); - GUILayout.EndHorizontal(); - } - - void GUIEndValueString() - { - GUILayout.BeginHorizontal(); - GUIToFromButton(); - _src.endValueString = EditorGUILayout.TextArea(_src.endValueString, EditorGUIUtils.wordWrapTextArea); - GUILayout.EndHorizontal(); - } - - void GUIEndValueRect() - { - GUILayout.BeginHorizontal(); - GUIToFromButton(); - _src.endValueRect = EditorGUILayout.RectField(_src.endValueRect); - GUILayout.EndHorizontal(); - } - - void GUIToFromButton() - { - if (GUILayout.Button(_src.isFrom ? "FROM" : "TO", EditorGUIUtils.sideBtStyle, GUILayout.Width(100))) _src.isFrom = !_src.isFrom; - GUILayout.Space(16); - } - } +// Author: Daniele Giardini - http://www.demigiant.com +// Created: 2015/03/12 16:03 + +using System; +using System.Collections.Generic; +using System.IO; +using DG.DemiEditor; +using DG.DOTweenEditor.Core; +using DG.Tweening; +using DG.Tweening.Core; +using UnityEditor; +using UnityEngine; +using UnityEngine.UI; + +#if DOTWEEN_TMP + using TMPro; +#endif + +namespace DG.DOTweenEditor +{ + [CustomEditor(typeof(DOTweenAnimation))] + public class DOTweenAnimationInspector : ABSAnimationInspector + { + static readonly Dictionary _AnimationTypeToComponent = new Dictionary() { + { DOTweenAnimationType.Move, new[] { typeof(Rigidbody), typeof(Rigidbody2D), typeof(RectTransform), typeof(Transform) } }, + { DOTweenAnimationType.LocalMove, new[] { typeof(Transform) } }, + { DOTweenAnimationType.Rotate, new[] { typeof(Rigidbody), typeof(Rigidbody2D), typeof(Transform) } }, + { DOTweenAnimationType.LocalRotate, new[] { typeof(Transform) } }, + { DOTweenAnimationType.Scale, new[] { typeof(Transform) } }, + { DOTweenAnimationType.Color, new[] { typeof(SpriteRenderer), typeof(Renderer), typeof(Image), typeof(Text) } }, + { DOTweenAnimationType.Fade, new[] { typeof(SpriteRenderer), typeof(Renderer), typeof(Image), typeof(Text) } }, + { DOTweenAnimationType.Text, new[] { typeof(Text) } }, + { DOTweenAnimationType.PunchPosition, new[] { typeof(RectTransform), typeof(Transform) } }, + { DOTweenAnimationType.PunchRotation, new[] { typeof(Transform) } }, + { DOTweenAnimationType.PunchScale, new[] { typeof(Transform) } }, + { DOTweenAnimationType.ShakePosition, new[] { typeof(RectTransform), typeof(Transform) } }, + { DOTweenAnimationType.ShakeRotation, new[] { typeof(Transform) } }, + { DOTweenAnimationType.ShakeScale, new[] { typeof(Transform) } }, + { DOTweenAnimationType.CameraAspect, new[] { typeof(Camera) } }, + { DOTweenAnimationType.CameraBackgroundColor, new[] { typeof(Camera) } }, + { DOTweenAnimationType.CameraFieldOfView, new[] { typeof(Camera) } }, + { DOTweenAnimationType.CameraOrthoSize, new[] { typeof(Camera) } }, + { DOTweenAnimationType.CameraPixelRect, new[] { typeof(Camera) } }, + { DOTweenAnimationType.CameraRect, new[] { typeof(Camera) } }, + }; + +#if DOTWEEN_TK2D + static readonly Dictionary _Tk2dAnimationTypeToComponent = new Dictionary() { + { DOTweenAnimationType.Color, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, + { DOTweenAnimationType.Fade, new[] { typeof(tk2dBaseSprite), typeof(tk2dTextMesh) } }, + { DOTweenAnimationType.Text, new[] { typeof(tk2dTextMesh) } } + }; +#endif +#if DOTWEEN_TMP + static readonly Dictionary _TMPAnimationTypeToComponent = new Dictionary() { + { DOTweenAnimationType.Color, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, + { DOTweenAnimationType.Fade, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } }, + { DOTweenAnimationType.Text, new[] { typeof(TextMeshPro), typeof(TextMeshProUGUI) } } + }; +#endif + + static readonly string[] _AnimationType = new[] { + "None", + "Move", "LocalMove", + "Rotate", "LocalRotate", + "Scale", + "Color", "Fade", + "Text", + "Punch/Position", "Punch/Rotation", "Punch/Scale", + "Shake/Position", "Shake/Rotation", "Shake/Scale", + "Camera/Aspect", "Camera/BackgroundColor", "Camera/FieldOfView", "Camera/OrthoSize", "Camera/PixelRect", "Camera/Rect" + }; + static string[] _animationTypeNoSlashes; // _AnimationType list without slashes in values + static string[] _datString; // String representation of DOTweenAnimation enum (here for caching reasons) + + DOTweenAnimation _src; + bool _runtimeEditMode; // If TRUE allows to change and save stuff at runtime + int _totComponentsOnSrc; // Used to determine if a Component is added or removed from the source + + // =================================================================================== + // MONOBEHAVIOUR METHODS ------------------------------------------------------------- + + void OnEnable() + { + _src = target as DOTweenAnimation; + + onStartProperty = base.serializedObject.FindProperty("onStart"); + onPlayProperty = base.serializedObject.FindProperty("onPlay"); + onUpdateProperty = base.serializedObject.FindProperty("onUpdate"); + onStepCompleteProperty = base.serializedObject.FindProperty("onStepComplete"); + onCompleteProperty = base.serializedObject.FindProperty("onComplete"); + + // Convert _AnimationType to _animationTypeNoSlashes + int len = _AnimationType.Length; + _animationTypeNoSlashes = new string[len]; + for (int i = 0; i < len; ++i) { + string a = _AnimationType[i]; + a = a.Replace("/", ""); + _animationTypeNoSlashes[i] = a; + } + } + + override public void OnInspectorGUI() + { + base.OnInspectorGUI(); + + GUILayout.Space(3); + EditorGUIUtils.SetGUIStyles(); + + bool playMode = Application.isPlaying; + _runtimeEditMode = _runtimeEditMode && playMode; + + GUILayout.BeginHorizontal(); + EditorGUIUtils.InspectorLogo(); + GUILayout.Label(_src.animationType.ToString() + (string.IsNullOrEmpty(_src.id) ? "" : " [" + _src.id + "]"), EditorGUIUtils.sideLogoIconBoldLabelStyle); + // Up-down buttons + GUILayout.FlexibleSpace(); + if (GUILayout.Button("▲", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentUp(_src); + if (GUILayout.Button("▼", DeGUI.styles.button.toolIco)) UnityEditorInternal.ComponentUtility.MoveComponentDown(_src); + GUILayout.EndHorizontal(); + + if (playMode) { + if (_runtimeEditMode) { + + } else { + GUILayout.Space(8); + GUILayout.Label("Animation Editor disabled while in play mode", EditorGUIUtils.wordWrapLabelStyle); + if (!_src.isActive) { + GUILayout.Label("This animation has been toggled as inactive and won't be generated", EditorGUIUtils.wordWrapLabelStyle); + GUI.enabled = false; + } + if (GUILayout.Button(new GUIContent("Activate Edit Mode", "Switches to Runtime Edit Mode, where you can change animations values and restart them"))) { + _runtimeEditMode = true; + } + GUILayout.Label("NOTE: when using DOPlayNext, the sequence is determined by the DOTweenAnimation Components order in the target GameObject's Inspector", EditorGUIUtils.wordWrapLabelStyle); + GUILayout.Space(10); + if (!_runtimeEditMode) return; + } + } + + Undo.RecordObject(_src, "DOTween Animation"); + +// _src.isValid = Validate(); // Moved down + + EditorGUIUtility.labelWidth = 120; + + if (playMode) { + GUILayout.Space(4); + DeGUILayout.Toolbar("Edit Mode Commands"); + DeGUILayout.BeginVBox(DeGUI.styles.box.stickyTop); + GUILayout.BeginHorizontal(); + if (GUILayout.Button("TogglePause")) _src.tween.TogglePause(); + if (GUILayout.Button("Rewind")) _src.tween.Rewind(); + if (GUILayout.Button("Restart")) _src.tween.Restart(); + GUILayout.EndHorizontal(); + if (GUILayout.Button("Commit changes and restart")) { + _src.tween.Rewind(); + _src.tween.Kill(); + if (_src.isValid) { + _src.CreateTween(); + _src.tween.Play(); + } + } + GUILayout.Label("To apply your changes when exiting Play mode, use the Component's upper right menu and choose \"Copy Component\", then \"Paste Component Values\" after exiting Play mode", DeGUI.styles.label.wordwrap); + DeGUILayout.EndVBox(); + } else { + bool hasManager = _src.GetComponent() != null; + if (!hasManager) { + if (GUILayout.Button(new GUIContent("Add Manager", "Adds a manager component which allows you to choose additional options for this gameObject"))) { + _src.gameObject.AddComponent(); + } + } + } + + GUILayout.BeginHorizontal(); + DOTweenAnimationType prevAnimType = _src.animationType; +// _src.animationType = (DOTweenAnimationType)EditorGUILayout.EnumPopup(_src.animationType, EditorGUIUtils.popupButton); + _src.isActive = EditorGUILayout.Toggle(new GUIContent("", "If unchecked, this animation will not be created"), _src.isActive, GUILayout.Width(16)); + GUI.enabled = _src.isActive; + _src.animationType = AnimationToDOTweenAnimationType(_AnimationType[EditorGUILayout.Popup(DOTweenAnimationTypeToPopupId(_src.animationType), _AnimationType)]); + _src.autoPlay = DeGUILayout.ToggleButton(_src.autoPlay, new GUIContent("AutoPlay", "If selected, the tween will play automatically")); + _src.autoKill = DeGUILayout.ToggleButton(_src.autoKill, new GUIContent("AutoKill", "If selected, the tween will be killed when it completes, and won't be reusable")); + GUILayout.EndHorizontal(); + if (prevAnimType != _src.animationType) { + // Set default optional values based on animation type + switch (_src.animationType) { + case DOTweenAnimationType.Move: + case DOTweenAnimationType.LocalMove: + case DOTweenAnimationType.Rotate: + case DOTweenAnimationType.LocalRotate: + case DOTweenAnimationType.Scale: + _src.endValueV3 = Vector3.zero; + _src.endValueFloat = 0; + _src.optionalBool0 = _src.animationType == DOTweenAnimationType.Scale; + break; + case DOTweenAnimationType.Color: + case DOTweenAnimationType.Fade: + _src.endValueFloat = 0; + break; + case DOTweenAnimationType.Text: + _src.optionalBool0 = true; + break; + case DOTweenAnimationType.PunchPosition: + case DOTweenAnimationType.PunchRotation: + case DOTweenAnimationType.PunchScale: + _src.endValueV3 = _src.animationType == DOTweenAnimationType.PunchRotation ? new Vector3(0,180,0) : Vector3.one; + _src.optionalFloat0 = 1; + _src.optionalInt0 = 10; + _src.optionalBool0 = false; + break; + case DOTweenAnimationType.ShakePosition: + case DOTweenAnimationType.ShakeRotation: + case DOTweenAnimationType.ShakeScale: + _src.endValueV3 = _src.animationType == DOTweenAnimationType.ShakeRotation ? new Vector3(90,90,90) : Vector3.one; + _src.optionalInt0 = 10; + _src.optionalFloat0 = 90; + _src.optionalBool0 = false; + break; + case DOTweenAnimationType.CameraAspect: + case DOTweenAnimationType.CameraFieldOfView: + case DOTweenAnimationType.CameraOrthoSize: + _src.endValueFloat = 0; + break; + case DOTweenAnimationType.CameraPixelRect: + case DOTweenAnimationType.CameraRect: + _src.endValueRect = new Rect(0, 0, 0, 0); + break; + } + } + if (_src.animationType == DOTweenAnimationType.None) { + _src.isValid = false; + if (GUI.changed) EditorUtility.SetDirty(_src); + return; + } + + if (prevAnimType != _src.animationType || ComponentsChanged()) { + _src.isValid = Validate(); + } + + if (!_src.isValid) { + GUI.color = Color.red; + GUILayout.BeginVertical(GUI.skin.box); + GUILayout.Label("No valid Component was found for the selected animation", EditorGUIUtils.wordWrapLabelStyle); + GUILayout.EndVertical(); + GUI.color = Color.white; + if (GUI.changed) EditorUtility.SetDirty(_src); + return; + } + + _src.duration = EditorGUILayout.FloatField("Duration", _src.duration); + if (_src.duration < 0) _src.duration = 0; + _src.delay = EditorGUILayout.FloatField("Delay", _src.delay); + if (_src.delay < 0) _src.delay = 0; + _src.isIndependentUpdate = EditorGUILayout.Toggle("Ignore TimeScale", _src.isIndependentUpdate); + _src.easeType = EditorGUIUtils.FilteredEasePopup(_src.easeType); + if (_src.easeType == Ease.INTERNAL_Custom) { + _src.easeCurve = EditorGUILayout.CurveField(" Ease Curve", _src.easeCurve); + } + _src.loops = EditorGUILayout.IntField(new GUIContent("Loops", "Set to -1 for infinite loops"), _src.loops); + if (_src.loops < -1) _src.loops = -1; + if (_src.loops > 1 || _src.loops == -1) + _src.loopType = (LoopType)EditorGUILayout.EnumPopup(" Loop Type", _src.loopType); + _src.id = EditorGUILayout.TextField("ID", _src.id); + + bool canBeRelative = true; + // End value and eventual specific options + switch (_src.animationType) { + case DOTweenAnimationType.Move: + case DOTweenAnimationType.LocalMove: + GUIEndValueV3(); + _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + break; + case DOTweenAnimationType.Rotate: + case DOTweenAnimationType.LocalRotate: + if (_src.GetComponent()) GUIEndValueFloat(); + else { + GUIEndValueV3(); + _src.optionalRotationMode = (RotateMode)EditorGUILayout.EnumPopup(" Rotation Mode", _src.optionalRotationMode); + } + break; + case DOTweenAnimationType.Scale: + if (_src.optionalBool0) GUIEndValueFloat(); + else GUIEndValueV3(); + _src.optionalBool0 = EditorGUILayout.Toggle("Uniform Scale", _src.optionalBool0); + break; + case DOTweenAnimationType.Color: + GUIEndValueColor(); + canBeRelative = false; + break; + case DOTweenAnimationType.Fade: + GUIEndValueFloat(); + if (_src.endValueFloat < 0) _src.endValueFloat = 0; + if (_src.endValueFloat > 1) _src.endValueFloat = 1; + canBeRelative = false; + break; + case DOTweenAnimationType.Text: + GUIEndValueString(); + _src.optionalBool0 = EditorGUILayout.Toggle("Rich Text Enabled", _src.optionalBool0); + _src.optionalScrambleMode = (ScrambleMode)EditorGUILayout.EnumPopup("Scramble Mode", _src.optionalScrambleMode); + _src.optionalString = EditorGUILayout.TextField(new GUIContent("Custom Scramble", "Custom characters to use in case of ScrambleMode.Custom"), _src.optionalString); + break; + case DOTweenAnimationType.PunchPosition: + case DOTweenAnimationType.PunchRotation: + case DOTweenAnimationType.PunchScale: + GUIEndValueV3(); + canBeRelative = false; + _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the punch vibrate"), _src.optionalInt0, 1, 50); + _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Elasticity", "How much the vector will go beyond the starting position when bouncing backwards"), _src.optionalFloat0, 0, 1); + if (_src.animationType == DOTweenAnimationType.PunchPosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + break; + case DOTweenAnimationType.ShakePosition: + case DOTweenAnimationType.ShakeRotation: + case DOTweenAnimationType.ShakeScale: + GUIEndValueV3(); + canBeRelative = false; + _src.optionalInt0 = EditorGUILayout.IntSlider(new GUIContent(" Vibrato", "How much will the shake vibrate"), _src.optionalInt0, 1, 50); + _src.optionalFloat0 = EditorGUILayout.Slider(new GUIContent(" Randomness", "The shake randomness"), _src.optionalFloat0, 0, 90); + if (_src.animationType == DOTweenAnimationType.ShakePosition) _src.optionalBool0 = EditorGUILayout.Toggle(" Snapping", _src.optionalBool0); + break; + case DOTweenAnimationType.CameraAspect: + case DOTweenAnimationType.CameraFieldOfView: + case DOTweenAnimationType.CameraOrthoSize: + GUIEndValueFloat(); + canBeRelative = false; + break; + case DOTweenAnimationType.CameraBackgroundColor: + GUIEndValueColor(); + canBeRelative = false; + break; + case DOTweenAnimationType.CameraPixelRect: + case DOTweenAnimationType.CameraRect: + GUIEndValueRect(); + canBeRelative = false; + break; + } + + // Final settings + if (canBeRelative) _src.isRelative = EditorGUILayout.Toggle(" Relative", _src.isRelative); + + // Events + AnimationInspectorGUI.AnimationEvents(this, _src); + + if (GUI.changed) EditorUtility.SetDirty(_src); + } + + // Returns TRUE if the Component layout on the src gameObject changed (a Component was added or removed) + bool ComponentsChanged() + { + int prevTotComponentsOnSrc = _totComponentsOnSrc; + _totComponentsOnSrc = _src.gameObject.GetComponents().Length; + return prevTotComponentsOnSrc != _totComponentsOnSrc; + } + + // Checks if a Component that can be animated with the given animationType is attached to the src + bool Validate() + { + if (_src.animationType == DOTweenAnimationType.None) return false; + + Component srcTarget; + // First check for external plugins +#if DOTWEEN_TK2D + if (_Tk2dAnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _Tk2dAnimationTypeToComponent[_src.animationType]) { + srcTarget = _src.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + return true; + } + } + } +#endif +#if DOTWEEN_TMP + if (_TMPAnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _TMPAnimationTypeToComponent[_src.animationType]) { + srcTarget = _src.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + return true; + } + } + } +#endif + // Then check for regular stuff + if (_AnimationTypeToComponent.ContainsKey(_src.animationType)) { + foreach (Type t in _AnimationTypeToComponent[_src.animationType]) { + srcTarget = _src.GetComponent(t); + if (srcTarget != null) { + _src.target = srcTarget; + return true; + } + } + } + return false; + } + + DOTweenAnimationType AnimationToDOTweenAnimationType(string animation) + { + if (_datString == null) _datString = Enum.GetNames(typeof(DOTweenAnimationType)); + animation = animation.Replace("/", ""); + return (DOTweenAnimationType)(Array.IndexOf(_datString, animation)); + } + int DOTweenAnimationTypeToPopupId(DOTweenAnimationType animation) + { + return Array.IndexOf(_animationTypeNoSlashes, animation.ToString()); + } + + void GUIEndValueFloat() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueFloat = EditorGUILayout.FloatField(_src.endValueFloat); + GUILayout.EndHorizontal(); + } + + void GUIEndValueColor() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueColor = EditorGUILayout.ColorField(_src.endValueColor); + GUILayout.EndHorizontal(); + } + + void GUIEndValueV3() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueV3 = EditorGUILayout.Vector3Field("", _src.endValueV3, GUILayout.Height(16)); + GUILayout.EndHorizontal(); + } + + void GUIEndValueString() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueString = EditorGUILayout.TextArea(_src.endValueString, EditorGUIUtils.wordWrapTextArea); + GUILayout.EndHorizontal(); + } + + void GUIEndValueRect() + { + GUILayout.BeginHorizontal(); + GUIToFromButton(); + _src.endValueRect = EditorGUILayout.RectField(_src.endValueRect); + GUILayout.EndHorizontal(); + } + + void GUIToFromButton() + { + if (GUILayout.Button(_src.isFrom ? "FROM" : "TO", EditorGUIUtils.sideBtStyle, GUILayout.Width(100))) _src.isFrom = !_src.isFrom; + GUILayout.Space(16); + } + } } \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML b/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML index ad80aef0..472ed4b5 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/Editor/DOTweenProEditor.XML @@ -1,18 +1,18 @@ - - - - DOTweenProEditor - - - - - Custom colors - - - - - Needs to be overridden in order to initialize new styles added from inherited classes - - - - + + + + DOTweenProEditor + + + + + Custom colors + + + + + Needs to be overridden in order to initialize new styles added from inherited classes + + + + diff --git a/Assets/ThirdParty/Demigiant/DOTweenPro/readme.txt b/Assets/ThirdParty/Demigiant/DOTweenPro/readme.txt index 50f25c71..8c5df374 100644 --- a/Assets/ThirdParty/Demigiant/DOTweenPro/readme.txt +++ b/Assets/ThirdParty/Demigiant/DOTweenPro/readme.txt @@ -1,25 +1,25 @@ -DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant - -// GET STARTED ////////////////////////////////////////////// - -- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. -Do this AFTER you have imported other plugins, so they will be recognized and if DOTween has additional features for those plugins they will be imported. - -// VISUAL SCRIPTING (PRO ONLY) -- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" -- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" - -// SCRIPTING -- In your code, add "using DG.Tweening" to each class where you want to use DOTween. -- You're ready to tween. Check out the links below for full documentation and license info. - - -// LINKS /////////////////////////////////////////////////////// - -DOTween website (documentation, examples, etc): http://dotween.demigiant.com -DOTween license: http://dotween.demigiant.com/license.php -DOTween repository (Google Code): https://code.google.com/p/dotween/ - -// NOTES ////////////////////////////////////////////////////// - +DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. +Do this AFTER you have imported other plugins, so they will be recognized and if DOTween has additional features for those plugins they will be imported. + +// VISUAL SCRIPTING (PRO ONLY) +- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" +- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" + +// SCRIPTING +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ + +// NOTES ////////////////////////////////////////////////////// + - DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/ThirdParty/Demigiant/DemiLib/DemiLib.xml b/Assets/ThirdParty/Demigiant/DemiLib/DemiLib.xml index 16204c74..99e8b59b 100644 --- a/Assets/ThirdParty/Demigiant/DemiLib/DemiLib.xml +++ b/Assets/ThirdParty/Demigiant/DemiLib/DemiLib.xml @@ -1,36 +1,36 @@ - - - - DemiLib - - - - - Set when calling DeGUI.BeginGUI - - - - - Stores a color palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, - and changed at any time by calling DeGUI.ChangePalette. - You can inherit from this class to create custom color palettes with more color options. - - - - - Background colors - - - - - Content colors - - - - - Contains both free and pro skins color variations, - and automatically returns the correct one when converted to Color - - - - + + + + DemiLib + + + + + Set when calling DeGUI.BeginGUI + + + + + Stores a color palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, + and changed at any time by calling DeGUI.ChangePalette. + You can inherit from this class to create custom color palettes with more color options. + + + + + Background colors + + + + + Content colors + + + + + Contains both free and pro skins color variations, + and automatically returns the correct one when converted to Color + + + + diff --git a/Assets/ThirdParty/Demigiant/DemiLib/Editor/DemiEditor.XML b/Assets/ThirdParty/Demigiant/DemiLib/Editor/DemiEditor.XML index b8a78924..ed9a4e5e 100644 --- a/Assets/ThirdParty/Demigiant/DemiLib/Editor/DemiEditor.XML +++ b/Assets/ThirdParty/Demigiant/DemiLib/Editor/DemiEditor.XML @@ -1,310 +1,310 @@ - - - - DemiEditor - - - - - Texture extensions - - - - - Checks that the texture uses the correct import settings, and applies them if they're incorrect. - - - - - Global Demigiant GUI manager - - - - - Default color palette - - - - - Default style palette - - - - - TRUE if we're using the PRO skin - - - - - Call this at the beginning of GUI methods - - - - - - Changes the active palettes to the given ones - (or resets them to the default ones if NULL) - - - - - GUI extension methods - - - - - Clones the style and adds the given formats to it - - - - - Adds the given formats to the style - - - - - Sets the border of the style - - - - - Sets the border of the style - - - - - Sets the background of the style - - - - - Sets the contentOffset of the style - - - - - Sets the X contentOffset of the style - - - - - Sets the Y contentOffset of the style - - - - - Sets the margin of the style - - - - - Sets the margin of the style - - - - - Sets the left margin of the style - - - - - Sets the right margin of the style - - - - - Sets the top margin of the style - - - - - Sets the bottom margin of the style - - - - - Sets the padding of the style - - - - - Sets the padding of the style - - - - - Sets the left padding of the style - - - - - Sets the right padding of the style - - - - - Sets the top padding of the style - - - - - Sets the bottom padding of the style - - - - - Sets the Y fixedWidth of the style - - - - - Sets the fixedHeight of the style - - - - - Sets the stretchHeight property of the style - - - - - Sets the stretchWidth property of the style - - - - - Assembly extensions - - - - AssetDatabase path to the assembly directory, without final slash - - - - File utils - - - - Path slash for AssetDatabase format - - - Path slash to replace for AssetDatabase format - - - Current OS path slash - - - Path slash to replace on current OS - - - - Stores a GUIStyle palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, - and changed at any time by calling DeGUI.ChangePalette. - You can inherit from this class to create custom GUIStyle palettes with more options. - Each of the sub-options require a public Init method to initialize the styles, which will be called via Reflection. - - - - - Called automatically by DeGUI.BeginGUI. - Override when adding new style subclasses. - - - - - Extend any custom subpalettes from this, so they will be initialized correctly - - - - - GUILayout methods - - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - Button that can be toggled on and off - - - Toolbar foldout button - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - - - Button that can be toggled on and off - Button that can be toggled on and off - - - Begins an horizontal toolbar layout - - - Begins an horizontal toolbar layout - - - Begins an horizontal toolbar layout - - - Begins an horizontal toolbar layout - - - Ends an horizontal toolbar layout - - - A toolbar with a label - - - A toolbar with a label - - - A toolbar with a label - - - A toolbar with a label - - - A toolbar with a label - - - A toolbar with a label - - - Vertical box layout with style and color options - - - Vertical box layout with style and color options - - - End vertical box layout - - - Divider - - - - Contains both free and pro skins GUIStyle variations, - and automatically returns the correct one when converted to GUIStyle - - - - + + + + DemiEditor + + + + + Texture extensions + + + + + Checks that the texture uses the correct import settings, and applies them if they're incorrect. + + + + + Global Demigiant GUI manager + + + + + Default color palette + + + + + Default style palette + + + + + TRUE if we're using the PRO skin + + + + + Call this at the beginning of GUI methods + + + + + + Changes the active palettes to the given ones + (or resets them to the default ones if NULL) + + + + + GUI extension methods + + + + + Clones the style and adds the given formats to it + + + + + Adds the given formats to the style + + + + + Sets the border of the style + + + + + Sets the border of the style + + + + + Sets the background of the style + + + + + Sets the contentOffset of the style + + + + + Sets the X contentOffset of the style + + + + + Sets the Y contentOffset of the style + + + + + Sets the margin of the style + + + + + Sets the margin of the style + + + + + Sets the left margin of the style + + + + + Sets the right margin of the style + + + + + Sets the top margin of the style + + + + + Sets the bottom margin of the style + + + + + Sets the padding of the style + + + + + Sets the padding of the style + + + + + Sets the left padding of the style + + + + + Sets the right padding of the style + + + + + Sets the top padding of the style + + + + + Sets the bottom padding of the style + + + + + Sets the Y fixedWidth of the style + + + + + Sets the fixedHeight of the style + + + + + Sets the stretchHeight property of the style + + + + + Sets the stretchWidth property of the style + + + + + Assembly extensions + + + + AssetDatabase path to the assembly directory, without final slash + + + + File utils + + + + Path slash for AssetDatabase format + + + Path slash to replace for AssetDatabase format + + + Current OS path slash + + + Path slash to replace on current OS + + + + Stores a GUIStyle palette, which can be passed to default DeGUI layouts when calling DeGUI.BeginGUI, + and changed at any time by calling DeGUI.ChangePalette. + You can inherit from this class to create custom GUIStyle palettes with more options. + Each of the sub-options require a public Init method to initialize the styles, which will be called via Reflection. + + + + + Called automatically by DeGUI.BeginGUI. + Override when adding new style subclasses. + + + + + Extend any custom subpalettes from this, so they will be initialized correctly + + + + + GUILayout methods + + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + Button that can be toggled on and off + + + Toolbar foldout button + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + + + Button that can be toggled on and off + Button that can be toggled on and off + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Begins an horizontal toolbar layout + + + Ends an horizontal toolbar layout + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + A toolbar with a label + + + Vertical box layout with style and color options + + + Vertical box layout with style and color options + + + End vertical box layout + + + Divider + + + + Contains both free and pro skins GUIStyle variations, + and automatically returns the correct one when converted to GUIStyle + + + + diff --git a/Assets/ThirdParty/Demigiant/readme_DOTweenPro.txt b/Assets/ThirdParty/Demigiant/readme_DOTweenPro.txt index 40a976f5..54c4badf 100644 --- a/Assets/ThirdParty/Demigiant/readme_DOTweenPro.txt +++ b/Assets/ThirdParty/Demigiant/readme_DOTweenPro.txt @@ -1,24 +1,24 @@ -DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant - -// GET STARTED ////////////////////////////////////////////// - -- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. - -// VISUAL SCRIPTING (PRO ONLY) -- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" -- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" - -// SCRIPTING -- In your code, add "using DG.Tweening" to each class where you want to use DOTween. -- You're ready to tween. Check out the links below for full documentation and license info. - - -// LINKS /////////////////////////////////////////////////////// - -DOTween website (documentation, examples, etc): http://dotween.demigiant.com -DOTween license: http://dotween.demigiant.com/license.php -DOTween repository (Google Code): https://code.google.com/p/dotween/ - -// NOTES ////////////////////////////////////////////////////// - +DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. + +// VISUAL SCRIPTING (PRO ONLY) +- To animate a gameObject, select it and choose "Add Component > DOTween > DOTween Animation" +- To animate a gameObject along a path, select it and choose "Add Component > DOTween > DOTween Path" + +// SCRIPTING +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ + +// NOTES ////////////////////////////////////////////////////// + - DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file -- cgit v1.1-26-g67d0