mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 11:45:55 +00:00
Fix for x offsets
This commit is contained in:
parent
15457f4314
commit
4d2b58e234
4 changed files with 104 additions and 34 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue