public void Logout(SimpleCallback callback = null)
 {
     UserId       = null;
     UserName     = null;
     UserEmail    = null;
     UserLoggedIn = false;
     callback?.Invoke();
 }
Пример #2
0
        }//OnLookAround

        public IEnumerator LookAround(SimpleCallback callback = null)
        {
            yield return(new WaitForSeconds(1f));

            DirSwitcherCmp.OnSwitchDirection();
            yield return(new WaitForSeconds(1f));

            DirSwitcherCmp.OnSwitchDirection();
            yield return(new WaitForSeconds(1f));

            callback?.Invoke();
        }//LookAround
 internal void DisplayImmediate()
 {
     if (_textComponent != null)
     {
         _textComponent.text = _currentString;
         _isReading          = false;
         if (finishedCallback != null)
         {
             finishedCallback.Invoke();
         }
     }
 }
Пример #4
0
    public void ReadLine(float delayTimer = 0f, float readingSpeedRatio = 1f, string newString = "")
    {
        if (newLineCallback != null)
        {
            newLineCallback.Invoke();
        }
        if (newString != string.Empty)
        {
            FeedLine(newString);
        }

        if (_currentString == string.Empty)
        {
            DisplayImmediate();
            return;
        }
        else
        {
            _currentReadingSpeed = _readingSpeedReference * readingSpeedRatio;
            // Debug.Log("readingSpeedRatio: " + readingSpeedRatio);
            _characterTimer = _currentReadingSpeed + delayTimer;

            _isReading    = true;
            _currentIndex = 0;
            if (_textComponent == null)
            {
                _textComponent = GetComponent <TMP_Text>();
            }
            _textComponent.text = string.Empty;
            if (readingSpeedRatio == 0f)
            {
                _currentIndex = newString.Length;
                if (characterCallback != null)
                {
                    characterCallback();
                }
            }
        }
    }