32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using System;
|
|
using Code.Gameplay.Door;
|
|
using Code.Gameplay.Orders.Order;
|
|
using Code.UI;
|
|
using UnityEngine;
|
|
|
|
namespace Code.Generator
|
|
{
|
|
// Для написания нормальной системы комнат нужен другой подход в корне, это уже не исправить, только залатать большие дыры
|
|
public class Room : MonoBehaviour
|
|
{
|
|
[SerializeField] protected RoomType roomType;
|
|
public RoomType RoomType => roomType;
|
|
[SerializeField] protected float roomTimer;
|
|
public float RoomTimer => roomTimer;
|
|
[SerializeField] protected Transform enterMarker;
|
|
public Transform EnterMarker => enterMarker;
|
|
[SerializeField] protected Transform exitMarker;
|
|
[SerializeField] protected Transform doorSlot;
|
|
public Transform ExitMarker => exitMarker;
|
|
[SerializeField] protected Door door;
|
|
|
|
public void Initialize(IOrderService orderService)
|
|
{
|
|
door.TranslationMode(false);
|
|
|
|
if(roomTrigger) roomTrigger.OrderService = orderService;
|
|
}
|
|
public void Seal() => door.CloseTheDoor();
|
|
[SerializeField] public RoomTrigger roomTrigger;
|
|
}
|
|
} |