private IEnumerator ShowDialog(float time)
    {
        playerMovement.ToggleMovement(false);
        Dialog.Instance.UpdateDialog(conversationText);
        Scorekeeper.Instance.UpdateScore(250);
        float elapsed = 0;

        while (elapsed < time)
        {
            elapsed += Time.deltaTime;
            yield return(null);
        }
        playerMovement.ToggleMovement(true);
        ShoppingList.Instance.ReadyToLeave = true;
        Dialog.Instance.UpdateDialog("Finally! Now to get out of here...");
    }
Exemple #2
0
    public IEnumerator TimeWastingConversation(float timeWasted)
    {
        walk.IsWalking(false);
        playerMovement.ToggleMovement(false);
        Dialog.Instance.UpdateDialog(conversationText);
        float elapsed = 0;

        while (elapsed < timeWasted)
        {
            elapsed += Time.deltaTime;
            yield return(null);
        }
        playerMovement.ToggleMovement(true);
        StartCoroutine(Immunity(3f));
        walk.IsWalking(true);
    }