예제 #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();
        }
    }