This is attached to an empty GameObject in the scene, as follows:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using CustomExtensions;
public class GameBehavior : MonoBehaviour, IManager
{
public string labelText = "Collect all 4 items and win your freedom!";
public readonly int maxItems = 4;
public bool showWinScreen = false;
public bool showLossScreen = false;
public delegate void DebugDelegate(string newText);
public DebugDelegate debug = Print;
private string _state;
public string State
{
get { return _state; }
set { _state = value; }
}
private int _itemsCollected = 0;
public int Items
{
get { return _itemsCollected; }
set {
_itemsCollected = value;
if (_itemsCollected >= maxItems)
{
labelText = "You've found all the items!";
showWinScreen...