Fix for x offsets

This commit is contained in:
Marco 2025-04-22 13:50:26 +02:00
commit 4d2b58e234
4 changed files with 104 additions and 34 deletions

View file

@ -1,4 +1,5 @@
using Cirno.Scripts.Enums;
using System.Collections.Generic;
using Cirno.Scripts.Enums;
using Godot;
using Godot.Collections;
@ -24,4 +25,16 @@ public partial class RogueliteRoomResource : Resource
{
return $"{RoomName} {Type} {Size.X}x{Size.Y}";
}
public List<Vector2I> GetTopRoomOffsets(Vector2I gridPosition)
{
List<Vector2I> offsets = [];
for (int i = 0; i < Size.X; i++)
{
offsets.Add(new Vector2I(gridPosition.X - i, gridPosition.Y));
}
return offsets;
}
}