本文整理汇总了C#中LTDescr.callOnCompletes方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.callOnCompletes方法的具体用法?C# LTDescr.callOnCompletes怎么用?C# LTDescr.callOnCompletes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTDescr
的用法示例。
在下文中一共展示了LTDescr.callOnCompletes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: update
public static void update() {
if(frameRendered != Time.frameCount){ // make sure update is only called once per frame
init();
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5
dtEstimated = Time.realtimeSinceStartup - previousRealTime;
if(dtEstimated>0.2f) // a catch put in, when at the start sometimes this number can grow unrealistically large
dtEstimated = 0.2f;
previousRealTime = Time.realtimeSinceStartup;
#else
dtEstimated = dtEstimated<0f ? 0f : dtEstimated = Time.unscaledDeltaTime;
// Debug.Log("Time.unscaledDeltaTime:"+Time.unscaledDeltaTime);
#endif
dtActual = Time.deltaTime;
maxTweenReached = 0;
finishedCnt = 0;
// if(tweenMaxSearch>1500)
// Debug.Log("tweenMaxSearch:"+tweenMaxSearch +" maxTweens:"+maxTweens);
for( int i = 0; i <= tweenMaxSearch && i < maxTweens; i++){
tween = tweens[i];
// if(i==0 && tweens[i].toggle)
// Debug.Log("tweens["+i+"]"+tweens[i]);
if(tween.toggle){
maxTweenReached = i;
if (tween.updateInternal()) { // returns true if the tween is finished with it's loop
tweensFinished[finishedCnt] = i;
finishedCnt++;
}
}
}
// Debug.Log("maxTweenReached:"+maxTweenReached);
tweenMaxSearch = maxTweenReached;
frameRendered = Time.frameCount;
for(int i = 0; i < finishedCnt; i++){
j = tweensFinished[i];
tween = tweens[ j ];
// Debug.Log("removing tween:"+tween);
removeTween(j);
if(tween.hasExtraOnCompletes && tween.trans!=null)
tween.callOnCompletes();
}
}
}