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