Beispiel #1
0
    public static void Trigger(LevelEnd topic)
    {
        if (instance.isDialogueShown)
        {
            return;
        }

        if (topic != instance.currentLevelEnd)
        {
            instance.currentLinesIndex = 0;
        }

        instance.currentLevelEnd = topic;
        instance.isDialogueShown = true;

        if (instance.currentLinesIndex >= instance.currentDialogueLines.Length)
        {
            Debug.Log("No more dialogue lines.");
            return;
        }

        DialogueLine currentLine = instance.currentDialogueLines[instance.currentLinesIndex];

        if (currentLine.showNextLineAfterThis)
        {
            LoadingBar.DestroySelf();
            BackgroundSoundPlayer.Stop();
        }

        instance.text.text          = currentLine.text;
        instance.timeLastLineShowed = Time.time;

        instance.wrapper.SetActive(true);
        instance.closeButton.gameObject.SetActive(false);
        instance.StartCoroutine(instance.ShowButton());
    }
Beispiel #2
0
 public static void OpenDoorCensored()
 {
     LoadingBar.DestroySelf();
     instance.closedDoor.SetActive(false);
     instance.openedDoorCensored.SetActive(true);
 }