iTween的使用。

iTween的使用。_第2张图片
View Cart
AudioFrom
AudioTo
AudioUpdate
CameraFadeAdd
CameraFadeDepth
CameraFadeDestroy
CameraFadeSwap
CameraFadeFrom
CameraFadeTo
CameraTexture
ColorFrom
ColorTo
ColorUpdate
Count
DrawLine
DrawLineGizmos
DrawLineHandles
DrawPath
DrawPathGizmos
DrawPathHandles
PathLength
EaseType
FadeFrom
FadeTo
FadeUpdate
FloatUpdate
Hash
Init
LookFrom
LookTo
LookUpdate
LoopType
MoveAdd
MoveBy
MoveFrom
MoveTo
MoveUpdate
Pause
PunchPosition
PunchRotation
PunchScale
PutOnPath
PointOnPath
RectUpdate
Resume
RotateAdd
RotateBy
RotateFrom
RotateTo
RotateUpdate
ScaleAdd
ScaleBy
ScaleFrom
ScaleTo
ScaleUpdate
ShakePosition
ShakeRotation
ShakeScale
Stab
Stop
StopByName
ValueTo
Vector2Update
Vector3Update

AudioFrom BACK TO TOP

Instantly changes an AudioSource's volume and pitch then returns it to it's starting volume and pitch over time. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.

  • AudioFrom(GameObject target, float volume, float pitch, float time)
  • AudioFrom(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
audiosource AudioSource for which AudioSource to use
volume float or double for the target level of volume
pitch float or double for the target pitch
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

AudioTo BACK TO TOP

Fades volume and pitch of an AudioSource. Default AudioSource attached to GameObject will be used (if one exists) if not supplied.

  • AudioTo(GameObject target, float volume, float pitch, float time)
  • AudioTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
audiosource AudioSource for which AudioSource to use
volume float or double for the target level of volume
pitch float or double for the target pitch
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

AudioUpdate BACK TO TOP

Similar to AudioTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • AudioUpdate(GameObject target, float volume, float pitch, float time)
  • AudioUpdate(GameObject target, Hashtable args)
Property Name Type Purpose
audiosource AudioSource for which AudioSource to use
volume float or double for the target level of volume
pitch float or double for the target pitch
time float or double for the time in seconds the animation will take to complete

CameraFadeAdd BACK TO TOP

Creates a GameObject (if it doesn't exist) at the supplied depth that can be used to simulate a camera fade. If you don't choose to supply a Texture2D a black CameraFade with be created. If you don't supply a depth the default depth of 999999 will be used.

Returns a GameObject reference to the create CameraFade to allow additional customization such as its layer to ensure proper stacking.

  • CameraFadeAdd()
  • CameraFadeAdd(Texture2D texture)
  • CameraFadeAdd(Texture2D texture, int depth)

CameraFadeDepth BACK TO TOP

Changes a camera fade's depth.

  • CameraFadeDepth(int depth)

CameraFadeDestroy BACK TO TOP

Removes and destroys a camera fade.

  • CameraFadeDestroy()

CameraFadeSwap BACK TO TOP

Changes the camera fade's texture.

  • CameraFadeSwap(Texture2D texture)

CameraFadeFrom BACK TO TOP

Instantly changes the amount(transparency) of a camera fade and then returns it back over time.

  • CameraFadeFrom(float amount, float time)
  • CameraFadeFrom(Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount float or double for how transparent the Texture2D that the camera fade uses is
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

CameraFadeTo BACK TO TOP

Changes the amount(transparency) of a camera fade over time.

  • CameraFadeTo(float amount, float time)
  • CameraFadeTo(Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount float or double for how transparent the Texture2D that the camera fade uses is
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

CameraTexture BACK TO TOP

Creates and returns a full-screen Texture2D for use with CameraFade.

  • CameraTexture(Color color)

ColorFrom BACK TO TOP

Changes a GameObject's color values instantly then returns them to the provided properties over time. If a Light, GUIText or GUITexture component is attached, it will become the target of the animation.

  • ColorFrom(GameObject target, Hashtable args)
  • ColorFrom(GameObject target, Color color, float time)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
color Color the color to fade the object to
r float or double for the individual setting of the color red
g float or double for the individual setting of the color green
b float or double for the individual setting of the color blue
a float or double for the individual setting of the alpha
NamedColorValue NamedColorValue or string for which color of a shader to use. Uses "_Color" by default.
includechildren boolean for whether or not to include children of this GameObject. True by default
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ColorTo BACK TO TOP

Changes a GameObject's color values over time. If a Light, GUIText or GUITexture component is attached, they will become the target of the animation.

  • ColorTo(GameObject target, Hashtable args)
  • ColorTo(GameObject target, Color color, float time)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
color Color the color to fade the object to
r float or double for the individual setting of the color red
g float or double for the individual setting of the color green
b float or double for the individual setting of the color blue
a float or double for the individual setting of the alpha
NamedColorValue NamedColorValue or string for which color of a shader to use. Uses "_Color" by default.
includechildren boolean for whether or not to include children of this GameObject. True by default
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ColorUpdate BACK TO TOP

Similar to ColorTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • ColorUpdate(GameObject target, Color color, float time)
  • ColorUpdate(GameObject target, Hashtable args)
color Color the color to fade the object to
r float or double for the individual setting of the color red
g float or double for the individual setting of the color green
b float or double for the individual setting of the color blue
a float or double for the individual setting of the alpha
NamedColorValue NamedColorValue or string for which color of a shader to use. Uses "_Color" by default.
includechildren boolean for whether or not to include children of this GameObject. True by default
time float or double for the time in seconds the animation will take to complete

Count BACK TO TOP

Returns integer of iTweens.

  • Count() Count all iTweens in current scene
  • Count(string type) Count all iTweens in current scene of a particular type
  • Count(GameObject target) Count all iTweens on a GameObject
  • Count(GameObject target, string type) Count all iTweens on a GameObject of a particular type

DrawLine BACK TO TOP

When called from an OnDrawGizmos() function it will draw a line through the provided array of Vector3 or Transforms.

  • DrawLine(Vector3[] path)
  • DrawLine(Vector3[] path, Color color)
  • DrawLine(Transform[] path)
  • DrawLine(Transform[] path,Color color)

DrawLineGizmos BACK TO TOP

Draws a line through the provided array of Vector3s or Transforms with Gizmos.DrawLine(). Identical to DrawLine()

  • DrawLineGizmos(Vector3[] path)
  • DrawLineGizmos(Vector3[] path, Color color)
  • DrawLineGizmos(Transform[] path)
  • DrawLineGizmos(Transform[] path,Color color)

DrawLineHandles BACK TO TOP

Draws a line through the provided array of Vector3s or Transforms with Handles.DrawLine().

  • DrawLineHandles(Vector3[] path)
  • DrawLineHandles(Vector3[] path, Color color)
  • DrawLineHandles(Transform[] path)
  • DrawLineHandles(Transform[] path,Color color)

DrawPath BACK TO TOP

When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Vector3 or Transforms.

  • DrawPath(Vector3[] path)
  • DrawPath(Vector3[] path, Color color)
  • DrawPath(Transform[] path)
  • DrawPath(Transform[] path,Color color)

DrawPathGizmos BACK TO TOP

Draws a curved path through the provided array of Vector3s or Transforms with Gizmos.DrawLine(). Identical to DrawPath()

  • DrawPathGizmos(Vector3[] path)
  • DrawPathGizmos(Vector3[] path, Color color)
  • DrawPathGizmos(Transform[] path)
  • DrawPathGizmos(Transform[] path,Color color)

DrawPathHandles BACK TO TOP

Draws a curved path through the provided array of Vector3s or Transforms with Handles.DrawLine().

  • DrawPathHandles(Vector3[] path)
  • DrawPathHandles(Vector3[] path, Color color)
  • DrawPathHandles(Transform[] path)
  • DrawPathHandles(Transform[] path,Color color)

PathLength BACK TO TOP

Returns the length of a curved path drawn through the provided array of Vector3 or Transforms

  • PathLength(Vector3[])
  • PathLength(Transform[])

EaseType BACK TO TOP

An enumeration of the type of easing to use based on Robert Penner's open source easing equations.

Here's a good reference for what you can expect from each ease type (just click to animate the ball): here.

  • easeInQuad
  • easeOutQuad
  • easeInOutQuad
  • easeInCubic
  • easeOutCubic
  • easeInOutCubic
  • easeInQuart
  • easeOutQuart
  • easeInOutQuart
  • easeInQuint
  • easeOutQuint
  • easeInOutQuint
  • easeInSine
  • easeOutSine
  • easeInOutSine
  • easeInExpo
  • easeOutExpo
  • easeInOutExpo
  • easeInCirc
  • easeOutCirc
  • easeInOutCirc
  • linear
  • spring
  • easeInBounce
  • easeOutBounce
  • easeInOutBounce
  • easeInBack
  • easeOutBack
  • easeInOutBack
  • easeInElastic
  • easeOutElastic
  • easeInOutElastic

FadeFrom BACK TO TOP

Changes a GameObject's alpha value instantly then returns it to the provided alpha over time. If a Light, GUIText or GUITexture component is attached, it will become the target of the animation. Identical to using ColorFrom and using the "a" parameter.

  • FadeFrom(GameObject target, Hashtable args)
  • FadeFrom(GameObject target, float alpha, float time)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
alpha float or double for the initial alpha value of the animation.
amount float or double for the initial alpha value of the animation.
includechildren boolean for whether or not to include children of this GameObject. True by default
NamedValueColor NamedValueColor or string for which color of a shader to use. Uses "_Color" by default.
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

FadeTo BACK TO TOP

Changes a GameObject's alpha value over time. If a Light, GUIText or GUITexture component is attached, it will become the target of the animation. Identical to using ColorTo and using the "a" parameter.

  • FadeTo(GameObject target, Hashtable args)
  • FadeTo(GameObject target, float alpha, float time)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
alpha float or double for the initial alpha value of the animation.
amount float or double for the initial alpha value of the animation.
includechildren boolean for whether or not to include children of this GameObject. True by default
NamedValueColor NamedValueColor or string for which color of a shader to use. Uses "_Color" by default.
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

FadeUpdate BACK TO TOP

Similar to FadeTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • FadeUpdate(GameObject target, Hashtable args)
  • FadeUpdate(GameObject target, float alpha, float time)
alpha float or double for the individual setting of the alpha
includechildren boolean for whether or not to include children of this GameObject. True by default
time float or double for the time in seconds the animation will take to complete

FloatUpdate BACK TO TOP

Returns a float that is eased between a current and target value by the supplied speed.

  • FloatUpdate(float currentValue, float targetValue, float speed) : float

Hash BACK TO TOP

Universal interface to help in the creation of Hashtables. Especially useful for C# users.

  • Hash(params object[] args)

Init BACK TO TOP

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.

  • Init(GameObject target)

LookFrom BACK TO TOP

Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.

  • LookFrom(GameObject target, Vector3 looktarget, float time)
  • LookFrom(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
looktarget Transform or Vector3 for a target the GameObject will look at.
axis string Restricts rotation to the supplied axis only.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

LookTo BACK TO TOP

Rotates a GameObject to look at a supplied Transform or Vector3 over time.

  • LookTo(GameObject target, Vector3 looktarget, float time)
  • LookTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
looktarget Transform or Vector3 for a target the GameObject will look at.
axis string Restricts rotation to the supplied axis only.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

LookUpdate BACK TO TOP

Rotates a GameObject to look at a supplied Transform or Vector3 over time.

  • LookUpdate(GameObject target, Hashtable args)
  • LookUpdate(GameObject target, Vector3 looktarget, float time)
Property Name Type Purpose
looktarget Transform or Vector3 for a target the GameObject will look at.
axis string Restricts rotation to the supplied axis only.
time float or double for the time in seconds the animation will take to complete

LoopType BACK TO TOP

An enumeration of the type of loop (if any) to use.

  • none = Do not loop.
  • loop = Rewind and replay.
  • pingPong = Ping pong the animation back and forth.

MoveAdd BACK TO TOP

Translates a GameObject's position over time.

  • MoveAdd(GameObject target, Vector3 amount, float time)
  • MoveAdd(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
axis string restricts rotation to the supplied axis only
space Space for applying the transformation in either the world coordinate or local cordinate system. Defaults to local space
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

MoveBy BACK TO TOP

Adds the supplied coordinates to a GameObject's position.

  • MoveBy(GameObject target, Vector3 amount, float time)
  • MoveBy(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
axis string restricts rotation to the supplied axis only
space Space for applying the transformation in either the world coordinate or local cordinate system. Defaults to local space
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

MoveFrom BACK TO TOP

Instantly changes a GameObject's position to a supplied destination then returns it to it's starting position over time.

  • MoveFrom(GameObject target, Vector3 position, float time)
  • MoveFrom(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
position Transform or Vector3 for a point in space the GameObject will animate to.
path Transform[] or Vector3[] for a list of points to draw a Catmull-Rom through for a curved animation path
movetopath boolean for whether to automatically generate a curve from the GameObject's current position to the beginning of the path. True by default.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
lookahead float or double for how much of a percentage (from 0 to 1) to look ahead on a path to influence how strict "orienttopath" is and how much the object will anticipate each curve
axis string restricts rotation to the supplied axis only
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

MoveTo BACK TO TOP

Changes a GameObject's position over time to a supplied destination.

  • MoveTo(GameObject target, Vector3 position, float time)
  • MoveTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
position Transform or Vector3 for a point in space the GameObject will animate to.
path Transform[] or Vector3[] for a list of points to draw a Catmull-Rom through for a curved animation path
movetopath boolean for whether to automatically generate a curve from the GameObject's current position to the beginning of the path. True by default.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
lookahead float or double for how much of a percentage (from 0 to 1) to look ahead on a path to influence how strict "orienttopath" is and how much the object will anticipate each curve
axis string restricts rotation to the supplied axis only
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

MoveUpdate BACK TO TOP

Similar to MoveTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • MoveUpdate(GameObject target, Vector3 position, float time)
  • MoveUpdate(GameObject target, Hashtable args)
Property Name Type Purpose
position Transform or Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
axis string restricts rotation to the supplied axis only
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete

Pause BACK TO TOP

Pauses iTweens.

If an iTween is established with "ignoreTimeScale" set to true pause will not currently work. (Sorry)

  • Pause(GameObject target) Pause all iTweens on a GameObject.
  • Pause(GameObject target, bool includechildren) Pause all iTweens on a GameObject including its children.
  • Pause(GameObject target, string type) Pause all iTweens on a GameObject of a particular type.
  • Pause(GameObject target, string type, bool includechildren) Pause all iTweens on a GameObject of a particular type including its children.
  • Pause() Pause all iTweens in scene.

PunchPosition BACK TO TOP

Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.

  • PunchPosition(GameObject target, Vector3 amount, float time)
  • PunchPosition(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
space Space for applying the transformation in either the world coordinate or local coordinate system. Defaults to local space.
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
axis string restricts rotation to the supplied axis only
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with punches)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

PunchRotation BACK TO TOP

Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation. NOTE: Due to the way iTween utilizes the Transform.Rotate method, PunchRotation works best with single axis usage rather than punching with a Vector3.

  • PunchRotation(GameObject target, Vector3 amount, float time)
  • PunchRotation(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
space Space for applying the transformation in either the world coordinate or local cordinate system. Defaults to local space.
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with punches)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

PunchScale BACK TO TOP

Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.

  • PunchScale(GameObject target, Vector3 amount, float time)
  • PunchScale(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for a point in space the GameObject will animate to.
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with punches)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

PutOnPath BACK TO TOP

Puts a GameObject on a path at the provided percentage

  • PutOnPath(GameObject target, Vector3[] path, float percent)
  • PutOnPath(GameObject target, Transform[] path, float percent)
  • PutOnPath(Transform target, Vector3[] path, float percent)
  • PutOnPath(Transform target, Transform[] path, float percent)

PointOnPath BACK TO TOP

Returns a Vector3 position on a path at the provided percentage.

  • PointOnPath(Transform[] path, float percent)
  • PointOnPath(Vector3[] path, float percent)

RectUpdate BACK TO TOP

Returns a Rect that is eased between a current and target value by the supplied speed.

  • RectUpdate(Rect currentValue, Rect targetValue, float speed) : Rect

Resume BACK TO TOP

Resumes iTweens.

  • Resume(GameObject target) Resume all iTweens on a GameObject
  • Resume(GameObject target, bool includechildren) Resume all iTweens on a GameObject including its children.
  • Resume(GameObject target, string type) Resume all iTweens on a GameObject of a particular type.
  • Resume(GameObject target, string type, bool includechildren) Resume all iTweens on a GameObject of a particular type including its children.
  • Resume() Resume all iTweens in scene.

RotateAdd BACK TO TOP

Adds supplied Euler angles in degrees to a GameObject's rotation over time.

  • RotateAdd(GameObject target, Vector3 amount, float time)
  • RotateAdd(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the amount of Euler angles in degrees to add to the current rotation of the GameObject.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
space Space or string for applying the transformation in either the world coordinate or local cordinate system. Defaults to local space.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

RotateBy BACK TO TOP

Multiplies supplied values by 360 and rotates a GameObject by calculated amount over time.

  • RotateBy(GameObject target, Vector3 amount, float time)
  • RotateBy(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the amount to be multiplied by 360 to rotate the GameObject.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
space Space or string for applying the transformation in either the world coordinate or local cordinate system. Defaults to local space.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

RotateFrom BACK TO TOP

Instantly changes a GameObject's Euler angles in degrees then returns it to it's starting rotation over time.

  • RotateFrom(GameObject target, Vector3 rotation, float time)
  • RotateFrom(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
rotation Transform or Vector3 for the target Euler angles in degrees to rotate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

RotateTo BACK TO TOP

Rotates a GameObject to the supplied Euler angles in degrees over time.

  • RotateTo(GameObject target, Vector3 rotation, float time)
  • RotateTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
rotation Transform or Vector3 for the target Euler angles in degrees to rotate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

RotateUpdate BACK TO TOP

Similar to RotateTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • RotateUpdate(GameObject target, Hashtable args)
  • RotateUpdate(GameObject target, Vector3 rotation, float time)
Property Name Type Purpose
rotation Transform or Vector3 for the target Euler angles in degrees to rotate to.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
islocal boolean for whether to animate in world space or relative to the parent. False be default.
time float or double for the time in seconds the animation will take to complete

ScaleAdd BACK TO TOP

Adds to a GameObject's scale over time.

  • ScaleAdd(GameObject target, Vector3 amount, float time)
  • ScaleAdd(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the amount to be added to the GameObject's current scale.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ScaleBy BACK TO TOP

Multiplies a GameObject's scale over time.

  • ScaleBy(GameObject target, Vector3 amount, float time)
  • ScaleBy(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the amount to be added to the GameObject's current scale.
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ScaleFrom BACK TO TOP

Instantly changes a GameObject's scale then returns it to it's starting scale over time.

  • ScaleFrom(GameObject target, Vector3 scale, float time)
  • ScaleFrom(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
scale Transform or Vector3 for the initial scale
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ScaleTo BACK TO TOP

Changes a GameObject's scale over time.

  • ScaleTo(GameObject target, Vector3 scale, float time)
  • ScaleTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
scale Transform or Vector3 for the final scale
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed
delay float or double for the time in seconds the animation will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
looptype LoopType or string for the type of loop to apply once the animation has completed
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ScaleUpdate BACK TO TOP

Similar to ScaleTo but incredibly less expensive for usage inside the Update function or similar looping situations involving a "live" set of changing values. Does not utilize an EaseType.

  • ScaleUpdate(GameObject target, Vector3 scale, float time)
  • ScaleUpdate(GameObject target, Hashtable args)
Property Name Type Purpose
scale Transform or Vector3 for the final scale
x float or double for the individual setting of the x axis
y float or double for the individual setting of the y axis
z float or double for the individual setting of the z axis
time float or double for the time in seconds the animation will take to complete

ShakePosition BACK TO TOP

Randomly shakes a GameObject's position by a diminishing amount over time.

  • ShakePosition(GameObject target, Vector3 amount, float time)
  • ShakePosition(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the magnitude of shake
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
islocal boolean for whether to animate in world space or relative to the parent. False by default.
orienttopath boolean for whether or not the GameObject will orient to its direction of travel. False by default
looktarget Transform or Vector3 for a target the GameObject will look at
looktime float or double for the time in seconds the object will take to look at either the "looktarget" or "orienttopath"
axis string restricts rotation to the supplied axis only
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with shakes)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ShakeRotation BACK TO TOP

Randomly shakes a GameObject's rotation by a diminishing amount over time.

  • ShakeRotation(GameObject target, Vector3 amount, float time)
  • ShakeRotation(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the magnitude of shake
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
space Space for applying the transformation in either the world coordinate or local coordinate system. Defaults to local space.
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with shakes)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

ShakeScale BACK TO TOP

Randomly shakes a GameObject's scale by a diminishing amount over time.

  • ShakeScale(GameObject target, Vector3 amount, float time)
  • ShakeScale(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
amount Vector3 for the magnitude of shake
x float or double for the individual setting of the x magnitude
y float or double for the individual setting of the y magnitude
z float or double for the individual setting of the z magnitude
time float or double for the time in seconds the animation will take to complete
delay float or double for the time in seconds the animation will wait before beginning
looptype LoopType or string for the type of loop to apply once the animation has completed (only "loop" is allowed with shakes)
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

Stab BACK TO TOP

Plays an AudioClip once based on supplied volume and pitch and following any delay. AudioSource is optional as iTween will provide one.

  • Stab(GameObject target, AudioClip audioclip, float delay)
  • Stab(GameObject target, Hashtable args)
Property Name Type Purpose
audioclip AudioClip for a reference to the AudioClip to be played.
audiosource AudioSource for which AudioSource to use
volume float or double for the target level of volume
pitch float or double for the target pitch
delay float or double for the time in seconds the action will wait before beginning
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method

Stop BACK TO TOP

Stop iTweens.

Please note that as a result of how Unity threads some operations you may need to insert an arbitrary (though short) pause after a Stop call before adding a new iTween by using WaitForSeconds(). If you are using mouse or keyboard interaction I would advise calling your Stop in key/mouse down and any new iTween calls on key/mouse up as iTween follows a strict and self imposed "DDD" (Doesn't Destroy Duplicates).

  • Stop() Stop and destroy all Tweens in current scene
  • Stop(string type) Stop and destroy all iTweens in current scene of a particular type.
  • Stop(GameObject target) Stop and destroy all iTweens on a GameObject.
  • Stop(GameObject target, bool includechildren) Stop and destroy all iTweens on a GameObject including its children.
  • Stop(GameObject target, string type) Stop and destroy all iTweens on a GameObject of a particular type.
  • Stop(GameObject target, string type, bool includechildren) Stop and destroy all iTweens on a GameObject of a particular type including its children.

Stop By Name BACK TO TOP

Stop iTweens by name.

Please note that as a result of how Unity threads some operations you may need to insert an arbitrary (though short) pause after a Stop call before adding a new iTween by using WaitForSeconds(). If you are using mouse or keyboard interaction I would advise calling your Stop in key/mouse down and any new iTween calls on key/mouse up as iTween follows a strict and self imposed "DDD" (Doesn't Destroy Duplicates).

  • StopByName(string name) Stop and destroy and Tweens in current scene with the supplied name

ValueTo BACK TO TOP

Returns a value to a callback 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.

  • ValueTo(GameObject target, Hashtable args)
Property Name Type Purpose
name string an individual name useful for stopping iTweens by name
from float or double or Vector3 or Vector2 or Color or Rect for the starting value.
to float or double or Vector3 or Vector2 or Color or Rect for the ending value.
time float or double for the time in seconds the animation will take to complete
speed float or double can be used instead of time to allow animation based on speed (only works with Vector2, Vector3, and Floats)
delay float or double for the time in seconds the action will wait before beginning
easetype EaseType or string for the shape of the easing curve applied to the animation
onstart string for the name of a function to launch at the beginning of the animation
onstarttarget GameObject for a reference to the GameObject that holds the "onstart" method
onstartparams Object for arguments to be sent to the "onstart" method
onupdate string for the name of a function to launch on every step of the animation
onupdatetarget GameObject for a reference to the GameObject that holds the "onupdate" method
onupdateparams Object for arguments to be sent to the "onupdate" method
oncomplete string for the name of a function to launch at the end of the animation
oncompletetarget GameObject for a reference to the GameObject that holds the "oncomplete" method
oncompleteparams Object for arguments to be sent to the "oncomplete" method
ignoretimescale boolean setting this to true will allow the animation to continue independent of the current time which is helpful for animating menus after a game has been paused by setting Time.timeScale=0

Vector2Update BACK TO TOP

Returns a Vector2 that is eased between a current and target value by the supplied speed.

  • Vector2Update(Vector2 currentValue, Vector2 targetValue, float speed) : Vector2

Vector3Update BACK TO TOP

Returns a Vector3 that is eased between a current and target value by the supplied speed.

  • Vector3Update(Vector3 currentValue, Vector3 targetValue, float speed) : Vector3
Select Language
7 Online
digg
  Live Message
Share

你可能感兴趣的:(iTween的使用。)