void OnTriggerEnter(Collider other) { if (other.gameObject == playerObject) { narrationText.DisplayText(textToShow, timeToShow); } Destroy(gameObject); }
public override void Interact(GameObject user) { base.Interact(user); narrationText.DisplayText("Office Hours are over.", 5); PlayerEngine ps = user.GetComponent <PlayerEngine>(); if (ps) { ps.WinGame(); } }