private void initOpenCloseTweener() { animationContainer = base.transform.Find("AnimationContainer") as RectTransform; float y = animationContainer.anchoredPosition.y; float closedPosition = y - animationContainer.sizeDelta.y; openCloseTweener = GetComponent <OpenCloseTweener>(); openCloseTweener.OnPositionChanged += onPositionChanged; openCloseTweener.OnComplete += onTweenComplete; openCloseTweener.Init(y, closedPosition); openCloseTweener.SetOpen(); }
private void Start() { setWebPageSubPanelTitle(TitleToken); OpenCloseTweener componentInParent = GetComponentInParent <OpenCloseTweener>(); if (componentInParent.IsOpen && !componentInParent.IsTransitioning) { StartCoroutine(waitForEndOfFrame()); } else { componentInParent.OnComplete += onTweenComplete; } }
private void Awake() { openCloseTweener = GetComponent <OpenCloseTweener>(); enabledListener = cancelButton.AddComponent <GameObjectActiveListener>(); }