void Awake()
        {
            m_Canvas      = GetComponent <Canvas>();
            m_CanvasGroup = GetComponent <CanvasGroup>();
            m_ScrollRect  = GetComponent <ScrollRect>();

            m_OpenDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_OpenDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_OpenDialogTween.AddOnCompleteCallback(OnOpenTransitionComplete);
            m_CloseDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_CloseDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_CloseDialogTween.AddOnCompleteCallback(OnCloseTransitionComplete);
            m_TweenRunner = new TweenRunner <FloatTween>();
            m_TweenRunner.Init(this);

            m_Open = m_Canvas.enabled;
        }
Пример #2
0
        void Awake()
        {
            m_RectTransform = GetComponent <RectTransform>();

            m_MoveWindowTween = new FloatTween()
            {
                duration        = k_MoveWindowTransitionDuration,
                ignoreTimeScale = true,
                startValue      = 0f,
                targetValue     = 1f
            };
            m_MoveWindowTween.AddOnChangedCallback(OnMoveTab);
            m_MoveWindowTween.AddOnCompleteCallback(OnMoveTransitionComplete);
            m_MoveWindowTweenRunner = new TweenRunner <FloatTween>();
            m_MoveWindowTweenRunner.Init(this);
        }
Пример #3
0
        void Awake()
        {
            m_Canvas      = GetComponent <Canvas>();
            m_CanvasGroup = GetComponent <CanvasGroup>();
            m_ScrollRect  = GetComponent <ScrollRect>();

            m_OpenDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_OpenDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_OpenDialogTween.AddOnCompleteCallback(OnOpenTransitionComplete);
            m_CloseDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_CloseDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_CloseDialogTween.AddOnCompleteCallback(OnCloseTransitionComplete);
            m_TweenRunner = new TweenRunner <FloatTween>();
            m_TweenRunner.Init(this);

            m_Open  = m_Canvas.enabled;
            m_Ready = true;

            switch (m_DelayedStatus)
            {
            case true:
                Open();
                break;

            case false:
                Close();
                break;
            }
        }
Пример #4
0
        void Awake()
        {
            m_OpenDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_OpenDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_OpenDialogTween.AddOnCompleteCallback(OnOpenTransitionComplete);
            m_CloseDialogTween = new FloatTween()
            {
                duration        = UIConfig.dialogFadeTime,
                ignoreTimeScale = true
            };
            m_CloseDialogTween.AddOnChangedCallback(OnSetAlpha);
            m_CloseDialogTween.AddOnCompleteCallback(OnCloseTransitionComplete);
            m_TweenRunner = new TweenRunner <FloatTween>();
            m_TweenRunner.Init(this);

            if (m_Canvas != null)
            {
                m_Open = m_Canvas.enabled;
            }
        }