ColorTo
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. 随着时间改变物体的颜色。如果附加的组件是一个light,guitext或guitexture,他们将会变为动画的目标。
- 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
根据独立的名字用于停止iTweens。
|
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.
着色器使用的颜色。默认使用“_Color”。
|
includechildren
|
boolean
|
for whether or not to include children of this GameObject. True by default
这个游戏对象是否包含子物体。默认下为true。
|
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
游戏对象的引用,用来得到“onstart”方法。
|
onstartparams
|
Object
|
for arguments to be sent to the “onstart” method
发送给“onstart”方法的参数。
|
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
游戏对象的引用,用来得到“onupdate”方法。
|
onupdateparams
|
Object
|
for arguments to be sent to the “onupdate” method
发送给“onupdate”的参数。
|
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
游戏对象的引用,用来得到“oncomplete”方法。
|
oncompleteparams
|
Object
|
for arguments to be sent to the “oncomplete” method
发送给“oncomplete”方法的参数。
|
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
设置为true将会允许动画继续当前的时间,这个在游戏通过设置Time.timeScale=0之后暂停游戏后的菜单动画很有用。
|
ColorUpdate
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. 和ColorTo相似,但是在使用Update函数时会令人难以置信的提高性能,或类似循环的情况下涉及“live”设置改变值。不在使用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.
着色器使用的颜色。默认使用“_Color”。
|
includechildren
|
boolean
|
for whether or not to include children of this GameObject. True by default
这个游戏对象是否包含子物体。默认下为true。
|
time
|
float or double
|
for the time in seconds the animation will take to complete
完成动画需要的时间。
|
Count
Returns integer of iTweens. 返回iTweens的整数量。
- Count() Count all iTweens in current scene
计数当前场景中所有的iTweens。
- Count(string type) Count all iTweens in current scene of a particular type
计数当前场景中指定类型的所有的iTweens。
- Count(GameObject target) Count all iTweens on a GameObject
计数一个游戏对象上所有的iTweens。
- Count(GameObject target, string type) Count all iTweens on a GameObject of a particular type
计数一个游戏对象上一个特定类型的所有的iTweens。
DrawLine
When called from an OnDrawGizmos() function it will draw a line through the provided array of Vector3 or Transforms. 当调用OnDrawGizmos()函数时,他会通过提供的Vector3或Transforms数组画一条线。
- DrawLine(Vector3[] path)
- DrawLine(Vector3[] path, Color color)
- DrawLine(Transform[] path)
- DrawLine(Transform[] path,Color color)
DrawLineGizmos
Draws a line through the provided array of Vector3s or Transforms with Gizmos.DrawLine(). Identical to DrawLine() 使用Gizmos.DrawLine()通过提供的Vector3s或Transforms数组画一条线。和DrawLine()相同。
- DrawLineGizmos(Vector3[] path)
- DrawLineGizmos(Vector3[] path, Color color)
- DrawLineGizmos(Transform[] path)
- DrawLineGizmos(Transform[] path,Color color)
DrawLineHandles
Draws a line through the provided array of Vector3s or Transforms with Handles.DrawLine(). 利用Handles.Drawline()通过提供的Vector3s或Transforms数组画一条线。
- DrawLineHandles(Vector3[] path)
- DrawLineHandles(Vector3[] path, Color color)
- DrawLineHandles(Transform[] path)
- DrawLineHandles(Transform[] path,Color color)
DrawPath
When called from an OnDrawGizmos() function it will draw a curved path through the provided array of Vector3 or Transforms. 当调用OnDrawGizmos()时,他会通过Vector3或Transforms数组绘制一个曲线路径。
- DrawPath(Vector3[] path)
- DrawPath(Vector3[] path, Color color)
- DrawPath(Transform[] path)
- DrawPath(Transform[] path,Color color)
DrawPathGizmos
Draws a curved path through the provided array of Vector3s or Transforms with Gizmos.DrawLine(). Identical to DrawPath() 使用Gizmos.DrawLine()通过Vector3s或Transforms数组绘制一个曲线路径。和DrawPath()一样。
- DrawPathGizmos(Vector3[] path)
- DrawPathGizmos(Vector3[] path, Color color)
- DrawPathGizmos(Transform[] path)
- DrawPathGizmos(Transform[] path,Color color)
DrawPathHandles
Draws a curved path through the provided array of Vector3s or Transforms with Handles.DrawLine(). 利用Handles.DrawLine()通过提供的Vector3s或Transforms绘制一个曲线路径。
- DrawPathHandles(Vector3[] path)
- DrawPathHandles(Vector3[] path, Color color)
- DrawPathHandles(Transform[] path)
- DrawPathHandles(Transform[] path,Color color)
PathLength
Returns the length of a curved path drawn through the provided array of Vector3 or Transforms 返回通过Vector3或Transforms数组绘制的曲线路径的长度。
- PathLength(Vector3[])
- PathLength(Transform[])
EaseType
An enumeration of the type of easing to use based on Robert Penner’s open source easing equations. 基于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
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. 改变游戏对象的alpha值随着时间返回提供的alpha。如果附加的组件是light,guitext或guitexture,将会是变成动画的目标。和使用ColorFrom和使用“a”参数。
- 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
根据独立的名字用于停止iTweens。
|
alpha
|
float or double
|
for the initial alpha value of the animation.
动画初始化的alpha值。
|
amount
|
float or double
|
for the initial alpha value of the animation.
动画初始化的alpha值。
|
includechildren
|
boolean
|
for whether or not to include children of this GameObject. True by default
这个游戏对象是否包含子物体。默认下为true。
|
NamedValueColor
|
NamedValueColor or string
|
for which color of a shader to use. Uses “_Color” by default.
着色器使用的颜色。默认使用“_Color”。
|
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
游戏对象的引用,用来得到“onstart”方法。
|
onstartparams
|
Object
|
for arguments to be sent to the “onstart” method
发送给“onstart”方法的参数。
|
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
游戏对象的引用,用来得到“onupdate”方法。
|
onupdateparams
|
Object
|
for arguments to be sent to the “onupdate” method
发送给“onupdate”的参数。
|
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
游戏对象的引用,用来得到“oncomplete”方法。
|
oncompleteparams
|
Object
|
for arguments to be sent to the “oncomplete” method
发送给“oncomplete”方法的参数。
|
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
设置为true将会允许动画继续当前的时间,这个在游戏通过设置Time.timeScale=0之后暂停游戏后的菜单动画很有用。
|
FadeTo
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. 随着时间改变物体的alpha值。如果附加的组件是light,guitext或guitexture,将会是变成动画的目标。和使用ColorFrom和使用“a”参数。
- 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
根据独立的名字用于停止iTweens。
|
alpha
|
float or double
|
for the initial alpha value of the animation.
动画初始化的alpha值。
|
amount
|
float or double
|
for the initial alpha value of the animation.
动画初始化的alpha值。
|
includechildren
|
boolean
|
for whether or not to include children of this GameObject. True by default
这个游戏对象是否包含子物体。默认下为true。
|
NamedValueColor
|
NamedValueColor or string
|
for which color of a shader to use. Uses “_Color” by default.
着色器使用的颜色。默认使用“_Color”。
|
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
游戏对象的引用,用来得到“onstart”方法。
|
onstartparams
|
Object
|
for arguments to be sent to the “onstart” method
发送给“onstart”方法的参数。
|
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
游戏对象的引用,用来得到“onupdate”方法。
|
onupdateparams
|
Object
|
for arguments to be sent to the “onupdate” method
发送给“onupdate”的参数。
|
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
游戏对象的引用,用来得到“oncomplete”方法。
|
oncompleteparams
|
Object
|
for arguments to be sent to the “oncomplete” method
发送给“oncomplete”方法的参数。
|
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
设置为true将会允许动画继续当前的时间,这个在游戏通过设置Time.timeScale=0之后暂停游戏后的菜单动画很有用。
|
FadeUpdate
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. 和FadeTo相似,但是在使用Update函数时会令人难以置信的提高性能,或类似循环的情况下涉及“live”设置改变值。不在使用EaseType。
- FadeUpdate(GameObject target, Hashtable args)
- FadeUpdate(GameObject target, float alpha, float time)
alpha
|
float or double
|
for the individual setting of the alpha
独立设置alpha。
|
includechildren
|
boolean
|
for whether or not to include children of this GameObject. True by default
这个游戏对象是否包含子物体。默认下为true。
|
time
|
float or double
|
for the time in seconds the animation will take to complete
完成动画需要的时间。
|
FloatUpdate
Returns a float that is eased between a current and target value by the supplied speed. 根据提供的速度返回一个float缓动在当前和目标值之间。
- FloatUpdate(float currentValue, float targetValue, float speed) : float
Hash
Universal interface to help in the creation of Hashtables. Especially useful for C# users. 通用的接口来帮助创建哈希表。尤其是对C#用户。
- Hash(params object[] args)
Init
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. 设置游戏对象当一个初始化被添加时避免停顿。这是明智的在每个对象运行你想在他的Start或Awake中运行iTween。
LookFrom
Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it’s starting rotation over time. 瞬间旋转一个游戏对象监视着提供的Vector3然后随着时间返回他开始的旋转。
- 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
根据独立的名字用于停止iTweens。
|
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
游戏对象的引用,用来得到“onstart”方法。
|
onstartparams
|
Object
|
for arguments to be sent to the “onstart” method
发送给“onstart”方法的参数。
|
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
游戏对象的引用,用来得到“onupdate”方法。
|
onupdateparams
|
Object
|
for arguments to be sent to the “onupdate” method
发送给“onupdate”的参数。
|
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
游戏对象的引用,用来得到“oncomplete”方法。
|
oncompleteparams
|
Object
|
for arguments to be sent to the “oncomplete” method
发送给“oncomplete”方法的参数。
|
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
设置为true将会允许动画继续当前的时间,这个在游戏通过设置Time.timeScale=0之后暂停游戏后的菜单动画很有用。
|
|