Пример #1
0
    private void Update()
    {
        if (InputReceiver.CheckIf_Use_Pressed() && isPrintingDone && !isReachedEndOfTexts)
        {
            PrintNextTextAndInvokeAllHasBeenPrintedIfNot();
        }

        else if (InputReceiver.CheckIf_Quit_Pressed())
        {
            isTextLeft = false;
            OnAllTextHasBeenPrinted.Invoke();
        }
    }
Пример #2
0
 void PrintNextTextAndInvokeAllHasBeenPrintedIfNot()
 {
     //Only call again if printing has ended
     // if (isPrintingDone == true)
     if (CheckIfThereIsTextLeft())
     {
         StartCoroutine(PrintTextAndSelectNextTextWhenDoneRoutine());
         Debug.Log("Reached PrintText Routine Start");
     }
     else
     {
         OnAllTextHasBeenPrinted.Invoke();
         isReachedEndOfTexts = true;
         ResetAllTextMaxVisibleChars();
     }
 }
    public void PrintNextTextAndInvokeAllHasBeenPrintedIfNot()
    {
        if (isTextLeft)
        {
            isDuringInteraction = true;

            brain.enabled = false;
            StartCoroutine(PrintTextAndSelectNextTextWhenDoneRoutine());
        }
        else
        {
            if (OnAllTextHasBeenPrinted != null)
            {
                OnAllTextHasBeenPrinted.Invoke();
            }
            UnlockCursorViaGameManager();
        }
    }