public static void AddCenterOnClickChild(Transform t) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) UICenterOnClick componentInChildren = t.GetComponentInChildren <UICenterOnClick>(); if (componentInChildren != null) { Transform val = componentInChildren.get_transform(); int i = 0; for (int childCount = val.get_childCount(); i < childCount; i++) { val.GetChild(i).GetComponentsInChildren <BoxCollider>(true, Temporary.boxColliderList); int j = 0; for (int count = Temporary.boxColliderList.Count; j < count; j++) { if (Temporary.boxColliderList[j].GetComponent <UICenterOnClickChild>() == null) { Temporary.boxColliderList[j].get_gameObject().AddComponent <UICenterOnClickChild>(); } } Temporary.boxColliderList.Clear(); } } }
protected override void OnAwake() { base.OnAwake(); this.m_uiCenterOnClick = base.GetComponent <UICenterOnClick>(); if (null == this.m_uiCenterOnClick) { Debug.LogError("null == m_uiCenterOnClick"); } }
IEnumerator _CenterOn() { yield return(new WaitForEndOfFrame()); UICenterOnClick coc = gameObject.GetComponent <UICenterOnClick>(); coc.OnClick(); COC.springStrength = 8; }
private void OnClick() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00e6: Unknown result type (might be due to invalid IL or missing references) UICenterOnClick uICenterOnClick = NGUITools.FindInParents <UICenterOnClick>(this.get_gameObject()); if (!(uICenterOnClick == null)) { Transform val = uICenterOnClick.get_transform(); UICenterOnChild uICenterOnChild = NGUITools.FindInParents <UICenterOnChild>(this.get_gameObject()); UIPanel uIPanel = NGUITools.FindInParents <UIPanel>(this.get_gameObject()); if (uICenterOnChild != null) { if (uICenterOnChild.get_enabled()) { uICenterOnChild.CenterOn(val); } } else if (uIPanel != null && uIPanel.clipping != 0) { UIScrollView component = uIPanel.GetComponent <UIScrollView>(); Vector3 pos = -uIPanel.cachedTransform.InverseTransformPoint(val.get_position()); if (!component.canMoveHorizontally) { Vector3 localPosition = uIPanel.cachedTransform.get_localPosition(); pos.x = localPosition.x; } if (!component.canMoveVertically) { Vector3 localPosition2 = uIPanel.cachedTransform.get_localPosition(); pos.y = localPosition2.y; } SpringPanel.Begin(uIPanel.cachedGameObject, pos, 6f); } } }
IEnumerator _CenterOn() { while (!gameObject.activeInHierarchy) { yield return(new WaitForEndOfFrame()); } UICenterOnClick coc = gameObject.GetComponent <UICenterOnClick>(); coc.OnClick(); COC.springStrength = 8; if (!enablePlayAnim) { yield break; } enablePlayAnim = false; StartCoroutine("PlayShowAnim"); }