本文整理汇总了C#中LTDescr.onUpdateFloatRatio方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.onUpdateFloatRatio方法的具体用法?C# LTDescr.onUpdateFloatRatio怎么用?C# LTDescr.onUpdateFloatRatio使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTDescr
的用法示例。
在下文中一共展示了LTDescr.onUpdateFloatRatio方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: update
//.........这里部分代码省略.........
tween.ltRect.margin = new Vector2(newVect.x, newVect.y);
}
else if (tweenAction == TweenAction.GUI_SCALE)
{
tween.ltRect.rect = new Rect(tween.ltRect.rect.x, tween.ltRect.rect.y, newVect.x, newVect.y);
}
else if (tweenAction == TweenAction.GUI_ALPHA)
{
tween.ltRect.alpha = newVect.x;
}
else if (tweenAction == TweenAction.GUI_ROTATE)
{
tween.ltRect.rotation = newVect.x;
}
#if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5
else if (tweenAction == TweenAction.CANVAS_MOVE)
{
tween.rectTransform.anchoredPosition3D = newVect;
}
else if (tweenAction == TweenAction.CANVAS_SCALE)
{
tween.rectTransform.localScale = newVect;
}
#endif
}
// Debug.Log("tween.delay:"+tween.delay + " tween.passed:"+tween.passed + " tweenAction:"+tweenAction + " to:"+newVect+" axis:"+tween.axis);
if (dt != 0f && tween.hasUpdateCallback)
{
if (tween.onUpdateFloat != null)
{
tween.onUpdateFloat(val);
}
if (tween.onUpdateFloatRatio != null)
{
tween.onUpdateFloatRatio(val, ratioPassed);
}
else if (tween.onUpdateFloatObject != null)
{
tween.onUpdateFloatObject(val, tween.onUpdateParam);
}
else if (tween.onUpdateVector3Object != null)
{
tween.onUpdateVector3Object(newVect, tween.onUpdateParam);
}
else if (tween.onUpdateVector3 != null)
{
tween.onUpdateVector3(newVect);
}
else if (tween.onUpdateVector2 != null)
{
tween.onUpdateVector2(new Vector2(newVect.x, newVect.y));
}
}
#if LEANTWEEN_1
else if(tween.optional!=null){ // LeanTween 1.x legacy stuff
var onUpdate = tween.optional["onUpdate"];
if(onUpdate!=null){
Hashtable updateParam = (Hashtable)tween.optional["onUpdateParam"];
if((TweenAction)tweenAction==TweenAction.VALUE3){
if(onUpdate.GetType() == typeof(string)){
string onUpdateS = onUpdate as string;
customTarget = tween.optional["onUpdateTarget"]!=null ? tween.optional["onUpdateTarget"] as GameObject : trans.gameObject;
customTarget.BroadcastMessage( onUpdateS, newVect );
}else if(onUpdate.GetType() == typeof(System.Action<Vector3, Hashtable>)){
System.Action<Vector3, Hashtable> onUpdateA = (System.Action<Vector3, Hashtable>)onUpdate;