Class iTween
- Namespace
- VoxelPlayground.Utility
- Assembly
- GamePlay.dll
Version: 2.0.8
Author: Bob Berkebile (http://pixelplacement.com)
Support: http://itween.pixelplacement.com
public class iTween : MonoBehaviour
- Inheritance
-
objectiTween
- Extension Methods
Fields
_name
public string _name
Field Value
- string
delay
public float delay
Field Value
- float
easeType
public iTween.EaseType easeType
Field Value
id
public string id
Field Value
- string
isPaused
public bool isPaused
Field Value
- bool
isRunning
public bool isRunning
Field Value
- bool
loopType
public iTween.LoopType loopType
Field Value
method
public string method
Field Value
- string
time
public float time
Field Value
- float
tweens
public static List<Hashtable> tweens
Field Value
- List<Hashtable>
type
public string type
Field Value
- string
Methods
AudioFrom(GameObject, Hashtable)
Instantly changes an AudioSource's volume and pitch then returns it to it's starting volume and pitch over time with FULL customization options. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.
public static void AudioFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
AudioFrom(GameObject, float, float, float)
Instantly changes an AudioSource's volume and pitch then returns it to it's starting volume and pitch over time with MINIMUM customization options. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.
public static void AudioFrom(GameObject target, float volume, float pitch, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation which holds the AudioSource to be changed.
volumefloatfor the target level of volume. A float
pitchfloatfor the target pitch. A float
timefloatA float for the time in seconds the animation will take to complete.
AudioTo(GameObject, Hashtable)
Fades volume and pitch of an AudioSource with FULL customization options. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.
public static void AudioTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
AudioTo(GameObject, float, float, float)
Fades volume and pitch of an AudioSource with MINIMUM customization options. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.
public static void AudioTo(GameObject target, float volume, float pitch, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation which holds the AudioSource to be changed.
volumefloatfor the target level of volume. A float
pitchfloatfor the target pitch. A float
timefloatA float for the time in seconds the animation will take to complete.
AudioUpdate(GameObject, Hashtable)
Similar to AudioTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void AudioUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
AudioUpdate(GameObject, float, float, float)
Similar to AudioTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void AudioUpdate(GameObject target, float volume, float pitch, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
volumefloatA float for the target level of volume.
pitchfloatA float for the target pitch.
timefloatA float for the time in seconds the animation will take to complete.
ColorFrom(GameObject, Hashtable)
Changes a GameObject's color values instantly then returns them to the provided properties over time with FULL customization options.
public static void ColorFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ColorFrom(GameObject, Color, float)
Changes a GameObject's color values instantly then returns them to the provided properties over time with MINIMUM customization options.
public static void ColorFrom(GameObject target, Color color, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
colorColorA Color to change the GameObject's color to.
timefloatA float for the time in seconds the animation will take to complete.
ColorTo(GameObject, Hashtable)
Changes a GameObject's color values over time with FULL customization options.
public static void ColorTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ColorTo(GameObject, Color, float)
Changes a GameObject's color values over time with MINIMUM customization options.
public static void ColorTo(GameObject target, Color color, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
colorColorA Color to change the GameObject's color to.
timefloatA float for the time in seconds the animation will take to complete.
ColorUpdate(GameObject, Hashtable)
Similar to ColorTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void ColorUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ColorUpdate(GameObject, Color, float)
Similar to ColorTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void ColorUpdate(GameObject target, Color color, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
colorColorA Color to change the GameObject's color to.
timefloatA float for the time in seconds the animation will take to complete.
Count()
Count all iTweens in current scene.
public static int Count()
Returns
- int
Count(string)
Count all iTweens in current scene of a particular type.
public static int Count(string type)
Parameters
typestringA string name of the type of iTween you would like to stop. Can be written as part of a name such as "mov" for all "MoveTo" iTweens.
Returns
- int
Count(GameObject, string)
Count all iTweens on a GameObject of a particular type.
public static int Count(GameObject target, string type)
Parameters
targetGameObjecttypestringA string name of the type of iTween you would like to count. Can be written as part of a name such as "mov" for all "MoveTo" iTweens.
Returns
- int
Count(GameObject)
Count all iTweens on a GameObject.
public static int Count(GameObject target)
Parameters
targetGameObject
Returns
- int
DrawLine(Transform[], Color)
When called from an OnDrawGizmos() function it will draw a line through the provided array of Transforms.
public static void DrawLine(Transform[] line, Color color)
Parameters
DrawLine(Transform[])
When called from an OnDrawGizmos() function it will draw a line through the provided array of Transforms.
public static void DrawLine(Transform[] line)
Parameters
DrawLine(Vector3[], Color)
When called from an OnDrawGizmos() function it will draw a line through the provided array of Vector3s.
public static void DrawLine(Vector3[] line, Color color)
Parameters
DrawLine(Vector3[])
When called from an OnDrawGizmos() function it will draw a line through the provided array of Vector3s.
public static void DrawLine(Vector3[] line)
Parameters
lineVector3[]A
DrawLineGizmos(Transform[], Color)
Draws a line through the provided array of Transforms with Gizmos.DrawLine().
public static void DrawLineGizmos(Transform[] line, Color color)
Parameters
DrawLineGizmos(Transform[])
Draws a line through the provided array of Transforms with Gizmos.DrawLine().
public static void DrawLineGizmos(Transform[] line)
Parameters
DrawLineGizmos(Vector3[], Color)
Draws a line through the provided array of Vector3s with Gizmos.DrawLine().
public static void DrawLineGizmos(Vector3[] line, Color color)
Parameters
DrawLineGizmos(Vector3[])
Draws a line through the provided array of Vector3s with Gizmos.DrawLine().
public static void DrawLineGizmos(Vector3[] line)
Parameters
lineVector3[]A
DrawLineHandles(Transform[], Color)
Draws a line through the provided array of Transforms with Handles.DrawLine().
public static void DrawLineHandles(Transform[] line, Color color)
Parameters
DrawLineHandles(Transform[])
Draws a line through the provided array of Transforms with Handles.DrawLine().
public static void DrawLineHandles(Transform[] line)
Parameters
DrawLineHandles(Vector3[], Color)
Draws a line through the provided array of Vector3s with Handles.DrawLine().
public static void DrawLineHandles(Vector3[] line, Color color)
Parameters
DrawLineHandles(Vector3[])
Draws a line through the provided array of Vector3s with Handles.DrawLine().
public static void DrawLineHandles(Vector3[] line)
Parameters
lineVector3[]A
DrawPath(Transform[], Color)
When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Transforms.
public static void DrawPath(Transform[] path, Color color)
Parameters
DrawPath(Transform[])
When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Transforms.
public static void DrawPath(Transform[] path)
Parameters
DrawPath(Vector3[], Color)
When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Vector3s.
public static void DrawPath(Vector3[] path, Color color)
Parameters
DrawPath(Vector3[])
When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Vector3s.
public static void DrawPath(Vector3[] path)
Parameters
pathVector3[]A
DrawPathGizmos(Transform[], Color)
Draws a curved path through the provided array of Transforms with Gizmos.DrawLine().
public static void DrawPathGizmos(Transform[] path, Color color)
Parameters
DrawPathGizmos(Transform[])
Draws a curved path through the provided array of Transforms with Gizmos.DrawLine().
public static void DrawPathGizmos(Transform[] path)
Parameters
DrawPathGizmos(Vector3[], Color)
Draws a curved path through the provided array of Vector3s with Gizmos.DrawLine().
public static void DrawPathGizmos(Vector3[] path, Color color)
Parameters
DrawPathGizmos(Vector3[])
Draws a curved path through the provided array of Vector3s with Gizmos.DrawLine().
public static void DrawPathGizmos(Vector3[] path)
Parameters
pathVector3[]A
DrawPathHandles(Transform[], Color)
Draws a curved path through the provided array of Transforms with Handles.DrawLine().
public static void DrawPathHandles(Transform[] path, Color color)
Parameters
DrawPathHandles(Transform[])
Draws a curved path through the provided array of Transforms with Handles.DrawLine().
public static void DrawPathHandles(Transform[] path)
Parameters
DrawPathHandles(Vector3[], Color)
Draws a curved path through the provided array of Vector3s with Handles.DrawLine().
public static void DrawPathHandles(Vector3[] path, Color color)
Parameters
DrawPathHandles(Vector3[])
Draws a curved path through the provided array of Vector3s with Handles.DrawLine().
public static void DrawPathHandles(Vector3[] path)
Parameters
pathVector3[]A
FadeFrom(GameObject, Hashtable)
Changes a GameObject's alpha value instantly then returns it to the provided alpha over time with FULL customization options. Identical to using ColorFrom and using the "a" parameter.
public static void FadeFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
FadeFrom(GameObject, float, float)
Changes a GameObject's alpha value instantly then returns it to the provided alpha over time with MINIMUM customization options. Identical to using ColorFrom and using the "a" parameter.
public static void FadeFrom(GameObject target, float alpha, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
alphafloatA float for the final alpha value of the animation.
timefloatA float for the time in seconds the animation will take to complete.
FadeTo(GameObject, Hashtable)
Changes a GameObject's alpha value over time with FULL customization options. Identical to using ColorTo and using the "a" parameter.
public static void FadeTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
FadeTo(GameObject, float, float)
Changes a GameObject's alpha value over time with MINIMUM customization options. Identical to using ColorTo and using the "a" parameter.
public static void FadeTo(GameObject target, float alpha, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
alphafloatA float for the final alpha value of the animation.
timefloatA float for the time in seconds the animation will take to complete.
FadeUpdate(GameObject, Hashtable)
Similar to FadeTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void FadeUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
FadeUpdate(GameObject, float, float)
Similar to FadeTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void FadeUpdate(GameObject target, float alpha, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
alphafloatA float for the final alpha value of the animation.
timefloatA float for the time in seconds the animation will take to complete.
FloatUpdate(float, float, float)
Returns a float that is eased between a current and target value by the supplied speed.
public static float FloatUpdate(float currentValue, float targetValue, float speed)
Parameters
currentValuefloatA float the starting or initial value
targetValuefloatA float the target value that the current value will be eased to.
speedfloatA float to be used as rate of speed (larger number equals faster animation)
Returns
- float
A float
Hash(params object[])
Universal interface to help in the creation of Hashtables. Especially useful for C# users.
public static Hashtable Hash(params object[] args)
Parameters
argsobject[]A object of alternating name value pairs. For example "time",1,"delay",2...
Returns
- Hashtable
A System.Collections.Hashtable
Init(GameObject)
Sets up a GameObject to avoid hiccups when an initial iTween is added. It's advisable to run this on every object you intend to run iTween on in its Start or Awake.
public static void Init(GameObject target)
Parameters
targetGameObjectA GameObject to be the target to be initialized for iTween.
LookFrom(GameObject, Hashtable)
Instantly rotates a GameObject to look at a supplied Transform or Vector3 then returns it to it's starting rotation over time with FULL customization options.
public static void LookFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
LookFrom(GameObject, Vector3, float)
Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time with MINIMUM customization options.
public static void LookFrom(GameObject target, Vector3 looktarget, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
looktargetVector3A Vector3 to be the Vector3 that the target will look towards.
timefloatA float for the time in seconds the animation will take to complete.
LookTo(GameObject, Hashtable)
Rotates a GameObject to look at a supplied Transform or Vector3 over time with FULL customization options.
public static void LookTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
LookTo(GameObject, Vector3, float)
Rotates a GameObject to look at the supplied Vector3 over time with MINIMUM customization options.
public static void LookTo(GameObject target, Vector3 looktarget, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
looktargetVector3A Vector3 to be the Vector3 that the target will look towards.
timefloatA float for the time in seconds the animation will take to complete.
LookUpdate(GameObject, Hashtable)
Similar to LookTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void LookUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
LookUpdate(GameObject, Vector3, float)
Similar to LookTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void LookUpdate(GameObject target, Vector3 looktarget, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
looktargetVector3A Vector3 for a target the GameObject will look at.
timefloatA float for the time in seconds the animation will take to complete.
MoveAdd(GameObject, Hashtable)
Translates a GameObject's position over time with FULL customization options.
public static void MoveAdd(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
MoveAdd(GameObject, Vector3, float)
Translates a GameObject's position over time with MINIMUM customization options.
public static void MoveAdd(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount of change in position to move the GameObject.
timefloatA float for the time in seconds the animation will take to complete.
MoveBy(GameObject, Hashtable)
Adds the supplied coordinates to a GameObject's position with FULL customization options.
public static void MoveBy(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
MoveBy(GameObject, Vector3, float)
Adds the supplied coordinates to a GameObject's postion with MINIMUM customization options.
public static void MoveBy(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount of change in position to move the GameObject.
timefloatA float for the time in seconds the animation will take to complete.
MoveFrom(GameObject, Hashtable)
Instantly changes a GameObject's position to a supplied destination then returns it to it's starting position over time with FULL customization options.
public static void MoveFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
MoveFrom(GameObject, Vector3, float)
Instantly changes a GameObject's position to a supplied destination then returns it to it's starting position over time with MINIMUM customization options.
public static void MoveFrom(GameObject target, Vector3 position, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
positionVector3A Vector3 for the destination Vector3.
timefloatA float for the time in seconds the animation will take to complete.
MoveTo(GameObject, Hashtable)
Changes a GameObject's position over time to a supplied destination with FULL customization options.
public static void MoveTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
MoveTo(GameObject, Vector3, float)
Changes a GameObject's position over time to a supplied destination with MINIMUM customization options.
public static void MoveTo(GameObject target, Vector3 position, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
positionVector3A Vector3 for the destination Vector3.
timefloatA float for the time in seconds the animation will take to complete.
MoveUpdate(GameObject, Hashtable)
Similar to MoveTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void MoveUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
MoveUpdate(GameObject, Vector3, float)
Similar to MoveTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void MoveUpdate(GameObject target, Vector3 position, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
positionVector3A Vector3 for a point in space the GameObject will animate to.
timefloatA float for the time in seconds the animation will take to complete.
PathLength(Transform[])
Returns the length of a curved path drawn through the provided array of Transforms.
public static float PathLength(Transform[] path)
Parameters
Returns
- float
A float
PathLength(Vector3[])
Returns the length of a curved path drawn through the provided array of Vector3s.
public static float PathLength(Vector3[] path)
Parameters
Returns
- float
The length.
Pause()
Pause all iTweens in scene.
public static void Pause()
Pause(string)
Pause all iTweens in scene of a particular type.
public static void Pause(string type)
Parameters
typestringA string name of the type of iTween you would like to pause. Can be written as part of a name such as "mov" for all "MoveTo" iTweens.
Pause(GameObject, bool)
Pause all iTweens on a GameObject including its children.
public static void Pause(GameObject target, bool includechildren)
Parameters
targetGameObjectincludechildrenbool
Pause(GameObject, string, bool)
public static void Pause(GameObject target, string type, bool includechildren)
Parameters
targetGameObjecttypestringincludechildrenbool
Pause(GameObject, string)
public static void Pause(GameObject target, string type)
Parameters
targetGameObjecttypestring
Pause(GameObject)
Pause all iTweens on a GameObject.
public static void Pause(GameObject target)
Parameters
targetGameObject
PointOnPath(Transform[], float)
Returns a Vector3 position on a path at the provided percentage
public static Vector3 PointOnPath(Transform[] path, float percent)
Parameters
Returns
PointOnPath(Vector3[], float)
Returns a Vector3 position on a path at the provided percentage
public static Vector3 PointOnPath(Vector3[] path, float percent)
Parameters
Returns
PunchPosition(GameObject, Hashtable)
Applies a jolt of force to a GameObject's position and wobbles it back to its initial position with FULL customization options.
public static void PunchPosition(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
PunchPosition(GameObject, Vector3, float)
Applies a jolt of force to a GameObject's position and wobbles it back to its initial position with MINIMUM customization options.
public static void PunchPosition(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of the punch.
timefloatA float for the time in seconds the animation will take to complete.
PunchRotation(GameObject, Hashtable)
Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation with FULL customization options.
public static void PunchRotation(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
PunchRotation(GameObject, Vector3, float)
Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation with MINIMUM customization options.
public static void PunchRotation(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of the punch.
timefloatA float for the time in seconds the animation will take to complete.
PunchScale(GameObject, Hashtable)
Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale with FULL customization options.
public static void PunchScale(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
PunchScale(GameObject, Vector3, float)
Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale with MINIMUM customization options.
public static void PunchScale(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of the punch.
timefloatA float for the time in seconds the animation will take to complete.
PutOnPath(GameObject, Transform[], float)
Puts a GameObject on a path at the provided percentage
public static void PutOnPath(GameObject target, Transform[] path, float percent)
Parameters
targetGameObjectpathTransform[]percentfloatA float
PutOnPath(GameObject, Vector3[], float)
Puts a GameObject on a path at the provided percentage
public static void PutOnPath(GameObject target, Vector3[] path, float percent)
Parameters
targetGameObjectpathVector3[]A Vector3
percentfloatA float
PutOnPath(Transform, Transform[], float)
Puts a GameObject on a path at the provided percentage
public static void PutOnPath(Transform target, Transform[] path, float percent)
Parameters
PutOnPath(Transform, Vector3[], float)
Puts a GameObject on a path at the provided percentage
public static void PutOnPath(Transform target, Vector3[] path, float percent)
Parameters
RectUpdate(Rect, Rect, float)
public static Rect RectUpdate(Rect currentValue, Rect targetValue, float speed)
Parameters
Returns
Resume()
Resume all iTweens in scene.
public static void Resume()
Resume(string)
Resume all iTweens in scene of a particular type.
public static void Resume(string type)
Parameters
typestringA string name of the type of iTween you would like to resume. Can be written as part of a name such as "mov" for all "MoveTo" iTweens.
Resume(GameObject, bool)
Resume all iTweens on a GameObject including its children.
public static void Resume(GameObject target, bool includechildren)
Parameters
targetGameObjectincludechildrenbool
Resume(GameObject, string, bool)
public static void Resume(GameObject target, string type, bool includechildren)
Parameters
targetGameObjecttypestringincludechildrenbool
Resume(GameObject, string)
public static void Resume(GameObject target, string type)
Parameters
targetGameObjecttypestring
Resume(GameObject)
Resume all iTweens on a GameObject.
public static void Resume(GameObject target)
Parameters
targetGameObject
RotateAdd(GameObject, Hashtable)
Adds supplied Euler angles in degrees to a GameObject's rotation over time with FULL customization options.
public static void RotateAdd(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
RotateAdd(GameObject, Vector3, float)
Adds supplied Euler angles in degrees to a GameObject's rotation over time with MINIMUM customization options.
public static void RotateAdd(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount of Euler angles in degrees to add to the current rotation of the GameObject.
timefloatA float for the time in seconds the animation will take to complete.
RotateBy(GameObject, Hashtable)
Multiplies supplied values by 360 and rotates a GameObject by calculated amount over time with FULL customization options.
public static void RotateBy(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
RotateBy(GameObject, Vector3, float)
Multiplies supplied values by 360 and rotates a GameObject by calculated amount over time with MINIMUM customization options.
public static void RotateBy(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount to be multiplied by 360 to rotate the GameObject.
timefloatA float for the time in seconds the animation will take to complete.
RotateFrom(GameObject, Hashtable)
Instantly changes a GameObject's Euler angles in degrees then returns it to it's starting rotation over time (if allowed) with FULL customization options.
public static void RotateFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
RotateFrom(GameObject, Vector3, float)
Instantly changes a GameObject's Euler angles in degrees then returns it to it's starting rotation over time (if allowed) with MINIMUM customization options.
public static void RotateFrom(GameObject target, Vector3 rotation, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
rotationVector3A Vector3 for the target Euler angles in degrees to rotate from.
timefloatA float for the time in seconds the animation will take to complete.
RotateTo(GameObject, Hashtable)
Rotates a GameObject to the supplied Euler angles in degrees over time with FULL customization options.
public static void RotateTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
RotateTo(GameObject, Vector3, float)
Rotates a GameObject to the supplied Euler angles in degrees over time with MINIMUM customization options.
public static void RotateTo(GameObject target, Vector3 rotation, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
rotationVector3A Vector3 for the target Euler angles in degrees to rotate to.
timefloatA float for the time in seconds the animation will take to complete.
RotateUpdate(GameObject, Hashtable)
Similar to RotateTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void RotateUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
RotateUpdate(GameObject, Vector3, float)
Similar to RotateTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void RotateUpdate(GameObject target, Vector3 rotation, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
rotationVector3A Vector3 for the target Euler angles in degrees to rotate to.
timefloatA float for the time in seconds the animation will take to complete.
ScaleAdd(GameObject, Hashtable)
Adds to a GameObject's scale over time with FULL customization options.
public static void ScaleAdd(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ScaleAdd(GameObject, Vector3, float)
Adds to a GameObject's scale over time with FULL customization options.
public static void ScaleAdd(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount of scale to be added to the GameObject's current scale.
timefloatA float for the time in seconds the animation will take to complete.
ScaleBy(GameObject, Hashtable)
Multiplies a GameObject's scale over time with FULL customization options.
public static void ScaleBy(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ScaleBy(GameObject, Vector3, float)
Multiplies a GameObject's scale over time with MINIMUM customization options.
public static void ScaleBy(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the amount of scale to be multiplied by the GameObject's current scale.
timefloatA float for the time in seconds the animation will take to complete.
ScaleFrom(GameObject, Hashtable)
Instantly changes a GameObject's scale then returns it to it's starting scale over time with FULL customization options.
public static void ScaleFrom(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ScaleFrom(GameObject, Vector3, float)
Instantly changes a GameObject's scale then returns it to it's starting scale over time with MINIMUM customization options.
public static void ScaleFrom(GameObject target, Vector3 scale, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
scaleVector3A Vector3 for the final scale.
timefloatA float for the time in seconds the animation will take to complete.
ScaleTo(GameObject, Hashtable)
Changes a GameObject's scale over time with FULL customization options.
public static void ScaleTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ScaleTo(GameObject, Vector3, float)
Changes a GameObject's scale over time with MINIMUM customization options.
public static void ScaleTo(GameObject target, Vector3 scale, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
scaleVector3A Vector3 for the final scale.
timefloatA float for the time in seconds the animation will take to complete.
ScaleUpdate(GameObject, Hashtable)
Similar to ScaleTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with FULL customization options. Does not utilize an EaseType.
public static void ScaleUpdate(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ScaleUpdate(GameObject, Vector3, float)
Similar to ScaleTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values with MINIMUM customization options. Does not utilize an EaseType.
public static void ScaleUpdate(GameObject target, Vector3 scale, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
scaleVector3A Vector3 for the final scale.
timefloatA float for the time in seconds the animation will take to complete.
ShakePosition(GameObject, Hashtable)
Randomly shakes a GameObject's position by a diminishing amount over time with FULL customization options.
public static void ShakePosition(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ShakePosition(GameObject, Vector3, float)
Randomly shakes a GameObject's position by a diminishing amount over time with MINIMUM customization options.
public static void ShakePosition(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of shake.
timefloatA float for the time in seconds the animation will take to complete.
ShakeRotation(GameObject, Hashtable)
Randomly shakes a GameObject's rotation by a diminishing amount over time with FULL customization options.
public static void ShakeRotation(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ShakeRotation(GameObject, Vector3, float)
Randomly shakes a GameObject's rotation by a diminishing amount over time with MINIMUM customization options.
public static void ShakeRotation(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of shake.
timefloatA float for the time in seconds the animation will take to complete.
ShakeScale(GameObject, Hashtable)
Randomly shakes a GameObject's scale by a diminishing amount over time with FULL customization options.
public static void ShakeScale(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
ShakeScale(GameObject, Vector3, float)
Randomly shakes a GameObject's scale by a diminishing amount over time with MINIMUM customization options.
public static void ShakeScale(GameObject target, Vector3 amount, float time)
Parameters
targetGameObjectA GameObject to be the target of the animation.
amountVector3A Vector3 for the magnitude of shake.
timefloatA float for the time in seconds the animation will take to complete.
Stab(GameObject, Hashtable)
Plays an AudioClip once based on supplied volume and pitch and following any delay with FULL customization options. AudioSource is optional as iTween will provide one.
public static void Stab(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
Stab(GameObject, AudioClip, float)
Plays an AudioClip once based on supplied volume and pitch and following any delay with MINIMUM customization options. AudioSource is optional as iTween will provide one.
public static void Stab(GameObject target, AudioClip audioclip, float delay)
Parameters
targetGameObjectA GameObject to be the target of the animation which holds the AudioSource to be utilized.
audioclipAudioClipA AudioClip for a reference to the AudioClip to be played.
delayfloatA float for the time in seconds the action will wait before beginning.
Stop()
Stop and destroy all Tweens in current scene.
public static void Stop()
Stop(string)
Stop and destroy all iTweens in current scene of a particular type.
public static void Stop(string type)
Parameters
typestringA string name of the type of iTween you would like to stop. Can be written as part of a name such as "mov" for all "MoveTo" iTweens.
Stop(GameObject, bool)
Stop and destroy all iTweens on a GameObject including its children.
public static void Stop(GameObject target, bool includechildren)
Parameters
targetGameObjectincludechildrenbool
Stop(GameObject, string, bool)
public static void Stop(GameObject target, string type, bool includechildren)
Parameters
targetGameObjecttypestringincludechildrenbool
Stop(GameObject, string)
public static void Stop(GameObject target, string type)
Parameters
targetGameObjecttypestring
Stop(GameObject)
Stop and destroy all iTweens on a GameObject.
public static void Stop(GameObject target)
Parameters
targetGameObject
StopByName(string)
Stop and destroy all iTweens in current scene of a particular name.
public static void StopByName(string name)
Parameters
namestringThe string name of iTween you would like to stop.
StopByName(GameObject, string, bool)
public static void StopByName(GameObject target, string name, bool includechildren)
Parameters
targetGameObjectnamestringincludechildrenbool
StopByName(GameObject, string)
public static void StopByName(GameObject target, string name)
Parameters
targetGameObjectnamestring
ValueTo(GameObject, Hashtable)
Returns a value to an 'oncallback' method interpolated between the supplied 'from' and 'to' values for application as desired. Requires an 'onupdate' callback that accepts the same type as the supplied 'from' and 'to' properties.
public static void ValueTo(GameObject target, Hashtable args)
Parameters
targetGameObjectargsHashtable
Vector2Update(Vector2, Vector2, float)
Returns a Vector2 that is eased between a current and target value by the supplied speed.
public static Vector2 Vector2Update(Vector2 currentValue, Vector2 targetValue, float speed)
Parameters
currentValueVector2A Vector2 the starting or initial value
targetValueVector2A Vector2 the target value that the current value will be eased to.
speedfloatA float to be used as rate of speed (larger number equals faster animation)
Returns
Vector3Update(Vector3, Vector3, float)
Returns a Vector3 that is eased between a current and target value by the supplied speed.
public static Vector3 Vector3Update(Vector3 currentValue, Vector3 targetValue, float speed)
Parameters
currentValueVector3A Vector3 the starting or initial value
targetValueVector3A Vector3 the target value that the current value will be eased to.
speedfloatA float to be used as rate of speed (larger number equals faster animation)