using UnityEngine; using UnityEngine.UI; public class Door2 : MonoBehaviour { bool trig, open;//trig-проверка входа выхода в триггер(игрок должен быть с тегом Player) open-закрыть и открыть дверь public float smooth = 2.0f;//скорость вращения public float DoorOpenAngle = 85.0f;//угол вращения private Vector3 defaulRot; private Vector3 openRot; public Text txt;//text // Start is called before the first frame update }