2026-09-25 23:49:29 +03:00
|
|
|
using System.Collections.Generic;
|
2026-09-25 19:50:57 +03:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace _Project.Scripts.LevelGenerating
|
|
|
|
|
{
|
|
|
|
|
public class Room
|
|
|
|
|
{
|
2026-10-02 20:39:19 +03:00
|
|
|
public Room(Vector2 position, int width, int length, RoomType rt):this()
|
2026-09-25 19:50:57 +03:00
|
|
|
{
|
|
|
|
|
Position = position;
|
2026-10-02 20:39:19 +03:00
|
|
|
Width = width;
|
2026-09-25 19:50:57 +03:00
|
|
|
Length = length;
|
|
|
|
|
this.rt = rt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Room()
|
|
|
|
|
{
|
2026-09-25 23:49:29 +03:00
|
|
|
exits = new List<ExitsInRoomType>();
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-02 20:39:19 +03:00
|
|
|
public Room(Vector2 position, int width, int length, RoomType rt, EntranceToRoomType entrance):this()
|
2026-09-25 23:49:29 +03:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Position = position;
|
2026-10-02 20:39:19 +03:00
|
|
|
Width = width;
|
2026-09-25 23:49:29 +03:00
|
|
|
Length = length;
|
|
|
|
|
this.rt = rt;
|
|
|
|
|
this.entrance = entrance;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-02 20:39:19 +03:00
|
|
|
public Room(int width, int length, RoomType rt):this()
|
2026-09-25 23:49:29 +03:00
|
|
|
{
|
2026-10-02 20:39:19 +03:00
|
|
|
Width = width;
|
2026-09-25 23:49:29 +03:00
|
|
|
Length = length;
|
|
|
|
|
this.rt = rt;
|
2026-09-25 19:50:57 +03:00
|
|
|
}
|
|
|
|
|
|
2026-10-02 20:39:19 +03:00
|
|
|
public Room(Vector2 position, int width, int length, RoomType rt, bool isWallable, EntranceToRoomType entrance, List<ExitsInRoomType> exits)
|
2026-10-02 16:19:34 +03:00
|
|
|
{
|
|
|
|
|
Position = position;
|
2026-10-02 20:39:19 +03:00
|
|
|
Width = width;
|
2026-10-02 16:19:34 +03:00
|
|
|
Length = length;
|
|
|
|
|
this.rt = rt;
|
|
|
|
|
this.entrance = entrance;
|
|
|
|
|
this.isWallable = isWallable;
|
|
|
|
|
this.exits = exits;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-02 20:39:19 +03:00
|
|
|
public int Width { get; set; }//width - по оси z
|
|
|
|
|
public int Length { get; set; }//length- по оси x
|
2026-09-25 19:50:57 +03:00
|
|
|
public Vector2 Position;
|
|
|
|
|
public RoomType rt { get; set; }
|
2026-09-25 23:49:29 +03:00
|
|
|
public EntranceToRoomType entrance { get; set; }
|
2026-10-02 16:19:34 +03:00
|
|
|
public bool isWallable { get; set; }
|
2026-09-25 23:49:29 +03:00
|
|
|
public List<ExitsInRoomType> exits { get; set; }
|
|
|
|
|
|
2026-09-25 19:50:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|