using UnityEngine; using StarterAssets; using System.Collections; using UnityEngine.UIElements; public class Decomtamination : MonoBehaviour { [SerializeField] GameObject decomtaminationChamberDoor; StarterAssetsInputs inputs; Log log; void Awake() { inputs = FindFirstObjectByType(); log = FindFirstObjectByType(); } void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { Decomtaminating(); } } void Decomtaminating() { Debug.Log("Decomtaminating"); StartCoroutine(inputs.ToggleInput(5f)); log.WriteOutLog("You have entered the decomtamination chamber. Please wait while we process your decontamination...", 0.05f); decomtaminationChamberDoor.GetComponent().UnlockDoor(); GetComponent().enabled = false; } }