AnimationController
ImportStatement:
Properties
animation : Animation
progress : real
Methods
completeToBeginning()
completeToEnd()
reload()
DetailedDescription
一般动画由内部的定时器驱动,但这个元件允许我们用一个进度值控制动画。
1.3.1. Property Documentation
defaultanimation : Animation
被本元件控制的动画。注意被本元件控制的动画,总是工作在running和paused状态。不能手动的开始或停止。就像Behavior不能手动的开始和停止一样。
progress : real
表示动画的发展,值在0.0到1.0之间,比0小则设置成0,比1大则设置成1。
MethodDocumentation
completeToBeginning()
往开始播放,如果调用了这个方法,动画将往动画的开始状态播放。动画的控制过程值跟着动画的播放自动更新。同时参阅completeToEnd()和progress。
completeToEnd()
往结束播放,如果调用了这个方法,动画将往动画的结束状态播放。动画的控制过程值跟着动画的播放自动更新。同时参阅completeToBeginning()和progress。
reload()
重新加载动画属性。如果动画的属性变化,呼叫这个方法重新加载动画的定义。