本文整理汇总了C#中LTDescr.onCompleteObject方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.onCompleteObject方法的具体用法?C# LTDescr.onCompleteObject怎么用?C# LTDescr.onCompleteObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTDescr
的用法示例。
在下文中一共展示了LTDescr.onCompleteObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: update
//.........这里部分代码省略.........
customTarget.BroadcastMessage( onUpdateS, val );
}else{
trans.gameObject.BroadcastMessage( onUpdateS, val );
}
}else if(onUpdate.GetType() == typeof(System.Action<float, Hashtable>)){
System.Action<float, Hashtable> onUpdateA = (System.Action<float, Hashtable>)onUpdate;
onUpdateA(val, updateParam);
}else if(onUpdate.GetType() == typeof(System.Action<Vector3>)){
System.Action<Vector3> onUpdateA = (System.Action<Vector3>)onUpdate;
onUpdateA( newVect );
}else{
System.Action<float> onUpdateA = (System.Action<float>)onUpdate;
onUpdateA(val);
}
}
}
}
#endif
}
if(isTweenFinished){
// Debug.Log("finished tween:"+i+" tween:"+tween);
if(tweenAction==TweenAction.GUI_ROTATE)
tween.ltRect.rotateFinished = true;
if(tween.loopType==LeanTweenType.once || tween.loopCount==1){
if(tweenAction==TweenAction.DELAYED_SOUND){
AudioSource.PlayClipAtPoint((AudioClip)tween.onCompleteParam, tween.to, tween.from.x);
}
if(tween.onComplete!=null){
removeTween(i);
tween.onComplete();
}else if(tween.onCompleteObject!=null){
removeTween(i);
tween.onCompleteObject(tween.onCompleteParam);
}
#if !UNITY_METRO
else if(tween.optional!=null){
System.Action callback=null;
System.Action<object> callbackWithParam = null;
string callbackS=string.Empty;
object callbackParam=null;
if(tween.optional!=null && tween.trans){
if(tween.optional["onComplete"]!=null){
callbackParam = tween.optional["onCompleteParam"];
if(tween.optional["onComplete"].GetType()==typeof(string)){
callbackS = tween.optional["onComplete"] as string;
}else{
if(callbackParam!=null){
callbackWithParam = (System.Action<object>)tween.optional["onComplete"];
}else{
callback = (System.Action)tween.optional["onComplete"];
if(callback==null)
Debug.LogWarning("callback was not converted");
}
}
}
}
removeTween(i);
if(callbackWithParam!=null){
callbackWithParam( callbackParam );
}else if(callback!=null){
callback();
}else if(callbackS!=string.Empty){
示例2: update
//.........这里部分代码省略.........
}
}
#endif
}
if (isTweenFinished)
{
if (tween.loopType == LeanTweenType.once || tween.loopCount == 1)
{
tweensFinished[finishedCnt] = i;
finishedCnt++;
//Debug.Log("finished tween:"+i+" tween:"+tween);
if (tweenAction == TweenAction.GUI_ROTATE)
tween.ltRect.rotateFinished = true;
if (tweenAction == TweenAction.DELAYED_SOUND)
{
AudioSource.PlayClipAtPoint((AudioClip)tween.onCompleteParam, tween.to, tween.from.x);
}
}
else
{
if ((tween.loopCount < 0 && tween.type == TweenAction.CALLBACK) || tween.onCompleteOnRepeat)
{
if (tweenAction == TweenAction.DELAYED_SOUND)
{
AudioSource.PlayClipAtPoint((AudioClip)tween.onCompleteParam, tween.to, tween.from.x);
}
if (tween.onComplete != null)
{
tween.onComplete();
}
else if (tween.onCompleteObject != null)
{
tween.onCompleteObject(tween.onCompleteParam);
}
}
if (tween.loopCount >= 1)
{
tween.loopCount--;
}
// Debug.Log("tween.loopType:"+tween.loopType+" tween.loopCount:"+tween.loopCount+" passed:"+tween.passed);
if (tween.loopType == LeanTweenType.pingPong)
{
tween.direction = 0.0f - (tween.direction);
}
else
{
tween.passed = Mathf.Epsilon;
}
}
}
else if (tween.delay <= 0f)
{
tween.passed += dt * tween.direction;
}
else
{
tween.delay -= dt;
// Debug.Log("dt:"+dt+" tween:"+i+" tween:"+tween);
if (tween.delay < 0f)
{
tween.passed = 0.0f;//-tween.delay
tween.delay = 0.0f;
}