当前位置: 首页>>代码示例>>C#>>正文


C# LTDescr.onUpdateVector3Object方法代码示例

本文整理汇总了C#中LTDescr.onUpdateVector3Object方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.onUpdateVector3Object方法的具体用法?C# LTDescr.onUpdateVector3Object怎么用?C# LTDescr.onUpdateVector3Object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LTDescr的用法示例。


在下文中一共展示了LTDescr.onUpdateVector3Object方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: update


//.........这里部分代码省略.........

                        if(tweenAction==TweenAction.MOVE){
                            trans.position = newVect;
                        }else if(tweenAction==TweenAction.MOVE_LOCAL){
                            trans.localPosition = newVect;
                        }else if(tweenAction==TweenAction.ROTATE){
                            /*if(tween.hasPhysics){
                                trans.gameObject.rigidbody.MoveRotation(Quaternion.Euler( newVect ));
                            }else{*/
                                trans.eulerAngles = newVect;
                            // }
                        }else if(tweenAction==TweenAction.ROTATE_LOCAL){
                            trans.localEulerAngles = newVect;
                        }else if(tweenAction==TweenAction.SCALE){
                            trans.localScale = newVect;
                        }else if(tweenAction==TweenAction.GUI_MOVE){
                            tween.ltRect.rect = new Rect( newVect.x, newVect.y, tween.ltRect.rect.width, tween.ltRect.rect.height);
                        }else if(tweenAction==TweenAction.GUI_MOVE_MARGIN){
                            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;
                        }
                    }
                    //Debug.Log("tween.delay:"+tween.delay + " tween.passed:"+tween.passed + " tweenAction:"+tweenAction + " to:"+newVect+" axis:"+tween.axis);

                    if(tween.onUpdateFloat!=null){
                        tween.onUpdateFloat(val);
                    }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);
                    }
                    #if !UNITY_METRO
                    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;
                                    onUpdateA(newVect, updateParam);
                                }else{
                                    System.Action<Vector3> onUpdateA = (System.Action<Vector3>)onUpdate;
                                    onUpdateA(newVect);
                                }
                            }else{
                                if(onUpdate.GetType() == typeof(string)){
                                    string onUpdateS = onUpdate as string;
                                    if (tween.optional["onUpdateTarget"]!=null){
                                        customTarget = tween.optional["onUpdateTarget"] as GameObject;
                                        customTarget.BroadcastMessage( onUpdateS, val );
                                    }else{
                                        trans.gameObject.BroadcastMessage( onUpdateS, val );
                                    }
                                }else if(onUpdate.GetType() == typeof(System.Action<float, Hashtable>)){
开发者ID:KittyMac,项目名称:LeanTween,代码行数:67,代码来源:LeanTween.cs

示例2: update


//.........这里部分代码省略.........
								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;
									onUpdateA(newVect, updateParam);
								}else{
									System.Action<Vector3> onUpdateA = (System.Action<Vector3>)onUpdate;
									onUpdateA(newVect);
								}
							}else{
								if(onUpdate.GetType() == typeof(string)){
									string onUpdateS = onUpdate as string;
开发者ID:djfdat,项目名称:UnityTemplateProject-FolderStructure,代码行数:67,代码来源:LeanTween.cs


注:本文中的LTDescr.onUpdateVector3Object方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。