コード例 #1
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;
        }
コード例 #2
0
        public void Initialize()
        {
            if (m_Initialized)
            {
                return;
            }

            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);

            UpdateCorners();
            m_TweenRunner = new TweenRunner <FloatTween>();
            m_TweenRunner.Init(this);

            m_Initialized = true;
        }
コード例 #3
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);
        }
コード例 #4
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);
        }
コード例 #5
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;
            }
        }
コード例 #6
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;
            }
        }