Example #1
0
 private void TweenRadialImageOut()
 {
     _radialFillImages.AddIncrementalRadialFillTween(0.0f).TweenHolder
     .SetDuration(_holdDuration)
     .ClearOnFinishedOnce();
     _holdText.AddAlphaTween(1.0f).Holder
     .SetDuration(HOLD_TEXT_FADE_DURATION)
     .AddToOnFinishedOnce(() =>
                          _holdText.AddAlphaTween(0.0f).Holder
                          .SetDuration(HOLD_TEXT_FADE_DURATION));
 }
        private void Release(PointerEventData eventData)
        {
            _currentPointerId = NxSimpleButton.NO_BUTTON_ID;
            ResetButtonCollider();
            _torqueBar.rectTransform.sizeDelta = Vector2.zero;

            float worldSpaceRadius = _buttonCollider.radius / Mathf.Min(Screen.width, Screen.height) * 2.0f;

            if (eventData != null && Vector2.Distance(eventData.pointerCurrentRaycast.worldPosition,
                                                      _RectTransform.position) <= worldSpaceRadius)
            {
                _pullText.AddAlphaTween(1.0f).Holder
                .SetDuration(PULL_TEXT_FADE_DURATION)
                .AddToOnFinishedOnce(() =>
                                     _pullText.AddAlphaTween(0.0f).Holder
                                     .SetDuration(PULL_TEXT_FADE_DURATION));
            }

            _onReleased.Invoke();
        }
    private void Update()
    {
        if (!SplashScreen.isFinished || _titleText.Holder.enabled || _whiteFadeOut.Holder.enabled)
        {
            return;
        }

        _whiteFadeOut.AddAlphaTween(0.0f).Holder
        .SetDelay(0.5f)
        .SetDuration(1.0f)
        .AddToOnFinishedOnce(() => _titleText.AddAlphaTween(0.0f).Holder
                             .SetDelay(1.5f)
                             .SetDuration(1.0f)
                             .AddToOnFinishedOnce(LoadMainMenu));
    }