-начал функцию для подгонки комнаты под размеры

This commit is contained in:
vladislove committed 2026-10-02 18:22:16 +03:00
1 parent e84940b8fe
commit 6f0520f9a0
2 files changed
+23 -3

No files matched your search

@@ -18,9 +18,6 @@ namespace _Project.Scripts.LevelGenerating
[SerializeField] private GameObject GameObjectA;
[SerializeField] private GameObject GameObjectB;
private int RoomCount;
private LevelManager levelManager;
@@ -141,6 +138,13 @@ namespace _Project.Scripts.LevelGenerating
{
newRoom.isWallable = false;
levelManager.AddRoom(newRoom);
CreateCorridor(newRoom.Position,newRoom.Length,newRoom.Wigth,exitForCor);
}
else
{
newRoom.isWallable = true;
EditRoomFoFitting(newRoom,exitForCor);
levelManager.AddRoom(newRoom);
}
}
break;
@@ -149,6 +153,15 @@ namespace _Project.Scripts.LevelGenerating
}
private void EditRoomFoFitting(Room room)
{
if (room.Position.x + room.Length - lengthFloor <= 0)
{
}
}
private bool IsRoomCanFit(Vector2 vector2, ExitsInRoomType exitForCor)