Spawning special rooms

This commit is contained in:
Marco 2025-04-21 17:46:26 +02:00
commit 6e26eb21b1
17 changed files with 502 additions and 54 deletions

View file

@ -15,6 +15,10 @@ public partial class RogueliteRoom : Node2D
public Vector2I GridPosition { get; set; } // Set by dungeon manager
public Vector2I BottomLeft => GridPosition + new Vector2I(0, RoomResource.Size.Y - 1);
public Vector2I RandomBottomExit => BottomLeft - new Vector2I( GD.RandRange(0, RoomResource.Size.X - 1), 0);
[Export] public PackedScene DoorPrefab { get; private set; }
[Export] public PackedScene WallPrefab { get; private set; }
@ -208,4 +212,9 @@ public partial class RogueliteRoom : Node2D
{
if (area is not InteractionController player) return;
}
public override string ToString()
{
return $"{GridPosition} {RoomResource}";
}
}