Working on entrance and building out first level

This commit is contained in:
2026-01-16 16:53:33 +00:00
parent 9cfaec3ea1
commit 4a37a76e9e
33 changed files with 4450 additions and 238 deletions

View File

@@ -0,0 +1,31 @@
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<StarterAssetsInputs>();
log = FindFirstObjectByType<Log>();
}
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<Door>().UnlockDoor();
GetComponent<BoxCollider>().enabled = false;
}
}