33 lines
990 B
C#
33 lines
990 B
C#
using System;
|
|
using Code.Gameplay.Door;
|
|
using Code.UI;
|
|
using UnityEngine;
|
|
|
|
namespace Code.Generator
|
|
{
|
|
[RequireComponent(typeof(Transform))]
|
|
public class Room : MonoBehaviour
|
|
{
|
|
[SerializeField] private RoomType roomType;
|
|
public RoomType RoomType => roomType;
|
|
[SerializeField] private float roomTimer;
|
|
public float RoomTimer => roomTimer;
|
|
[SerializeField] private Transform enterMarker;
|
|
public Transform EnterMarker => enterMarker;
|
|
[SerializeField] private Transform exitMarker;
|
|
public Transform ExitMarker => exitMarker;
|
|
[SerializeField] private Door door;
|
|
|
|
private void Awake()
|
|
{
|
|
if (EnterMarker == null || ExitMarker == null)
|
|
{
|
|
Debug.LogError($"Але маркеры не найдены у комнаты {gameObject.name}");
|
|
}
|
|
}
|
|
|
|
public void Initialize() => door.TranslationMode(false);
|
|
|
|
//PIZDEC
|
|
}
|
|
} |