/// <summary> /// Failure due to healthy player exit without friend /// </summary> public void PlayerExitHealthyWithoutFriend() { if (!levelHasFinished) { CanvasFail.SetActive(true); failText.text = "You got home safely but Sandra is still at the party."; FindAndPlaceHuman(CanvasFail); levelHasFinished = true; } }
public TMP_Text failText = null; // or make public and drag /// <summary> /// Failure due to friend exposed /// </summary> public void NotifyFriendExposed() { if (!levelHasFinished && !CanvasFail.activeInHierarchy) { CanvasFail.SetActive(true); failText.text = "Sorry.\n\nYour friend is infected."; FindAndPlaceHuman(CanvasFail); levelHasFinished = true; } }