Souljack/Assets/_Project/Scripts/LevelGenerating/Room.cs

59 lines
1.6 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace _Project.Scripts.LevelGenerating
{
public class Room
{
public Room(Vector2 position, int wigth, int length, RoomType rt):this()
{
Position = position;
Wigth = wigth;
Length = length;
this.rt = rt;
}
public Room()
{
exits = new List<ExitsInRoomType>();
}
public Room(Vector2 position, int wigth, int length, RoomType rt, EntranceToRoomType entrance):this()
{
Position = position;
Wigth = wigth;
Length = length;
this.rt = rt;
this.entrance = entrance;
}
public Room(int wigth, int length, RoomType rt):this()
{
Wigth = wigth;
Length = length;
this.rt = rt;
}
public Room(Vector2 position, int wigth, int length, RoomType rt, bool isWalling, EntranceToRoomType entrance, List<ExitsInRoomType> exits)
{
Position = position;
Wigth = wigth;
Length = length;
this.rt = rt;
this.isWalling = isWalling;
this.entrance = entrance;
this.exits = exits;
}
public int Wigth { get; set; }
public int Length { get; set; }
public Vector2 Position;
public RoomType rt { get; set; }
public bool isWalling {get; set;} //примыкает ли комната к стене
public EntranceToRoomType entrance { get; set; }
public List<ExitsInRoomType> exits { get; set; }
}
}