mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Spawning special rooms
This commit is contained in:
parent
56094e89a0
commit
6e26eb21b1
17 changed files with 502 additions and 54 deletions
|
|
@ -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}";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue