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;
        }
    }
示例#3
0
        private void initOpenCloseTweener()
        {
            openPosition = rect.anchoredPosition.y;
            float closedPosition = openPosition - rect.rect.height;

            tweener                    = GetComponent <OpenCloseTweener>();
            tweener.OnComplete        += onTweenComplete;
            tweener.OnPositionChanged += onPositionChanged;
            tweener.Init(openPosition, closedPosition);
            if (wasCellPhoneAutoOpened())
            {
                tweener.SetClosed();
            }
            else
            {
                tweener.SetOpen();
            }
            onTweenComplete();
        }