gosha gosha

Generation

generate functionSun, 12 Feb 2023

If an enemy is nearby, the door will automatically close. 

private void OnTriggerEnter(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyIn"); doorClose = true; } } private void OnTriggerExit(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyOut"); doorClose = false; } }

Want to kickstart your project?Use the new AI Studio to create your code