Пример #1
0
        void Awake()
        {
            m_CurrentProgress = 0;
            m_ProgressTween   = new FloatTween
            {
                duration        = 0.1f,
                ignoreTimeScale = true,
            };
            m_ProgressTween.AddOnChangedCallback(OnProgressTweenChanged);

            m_LoopingTween = new FloatTween
            {
                duration        = m_LoopingDuration,
                ignoreTimeScale = true,
                startValue      = 0,
                targetValue     = -360,
            };
            m_LoopingTween.AddOnChangedCallback(OnLoopingTweenChanged);


            m_TweenRunner = new TweenRunner <FloatTween>();
            m_TweenRunner.Init(this);
        }
Пример #2
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;
            }
        }
Пример #3
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;
            }
        }