private void DrawTweenerProperties(UITweener tweener) { if (showGroup && (group == tweener.tweenGroup)) { GUI.color = new Color(1, 1, 0, 1); } GUILayout.BeginVertical("box"); GUI.color = Color.white; GUILayout.BeginHorizontal(); GUILayout.Label("GameObject", GUILayout.Width(80f)); EditorGUILayout.TextField(tweener.gameObject.name); if (GUILayout.Button("Locate", "PreButton")) { Selection.activeGameObject = tweener.gameObject; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("TweenType", GUILayout.Width(80f)); EditorGUILayout.TextField(tweener.GetType().Name); GUILayout.Label(new GUIContent("Tween Group", "可以直接在此更改"), GUILayout.Width(80f)); tweener.tweenGroup = EditorGUILayout.IntField(tweener.tweenGroup, GUILayout.Width(30f)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button(!tweener.isPlay ? "Play" : "Pause", "ButtonLeft")) { isPlay = false; tweener.OnPlayOrPause(!tweener.isPlay); } if (GUILayout.Button("Restart", "ButtonMid")) { tweener.OnRestart(); } if (GUILayout.Button("Stop", "ButtonRIght")) { tweener.OnStop(); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUI.color = Color.white; }
public void TweenAdd() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown if (this.get_enabled() && !(baseTween == null)) { int childCount = this.get_transform().get_childCount(); Transform[] array = (Transform[])new Transform[childCount]; for (int i = 0; i < childCount; i++) { array[i] = this.get_transform().GetChild(i); } for (int j = 0; j < childCount; j++) { Transform val = array[j]; if (val == null) { return; } UITweenAddCtrlChild[] componentsInChildren = val.GetComponentsInChildren <UITweenAddCtrlChild>(); if (componentsInChildren == null || componentsInChildren.Length == 0) { GameObject val2 = new GameObject(val.get_name()); val2.set_layer(5); val2.get_transform().set_parent(val.get_transform().get_parent()); val2.get_transform().set_localPosition(val.get_transform().get_localPosition()); val2.get_transform().set_localScale(Vector3.get_one()); val2.AddComponent <UITweenAddCtrlChild>(); UIWidget component = val.GetComponent <UIWidget>(); if (component != null) { UIWidget uIWidget = val2.AddComponent <UIWidget>(); uIWidget.width = component.width; uIWidget.height = component.height; uIWidget.keepAspectRatio = component.keepAspectRatio; uIWidget.pivot = component.pivot; uIWidget.depth = component.depth; uIWidget.alpha = component.alpha; } val.get_transform().set_parent(val2.get_transform()); Component val3 = val.get_gameObject().GetComponent(baseTween.GetType()); if (val3 == null) { val3 = val.get_gameObject().AddComponent(baseTween.GetType()); } } } InitTween(); } }