mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 15:05:54 +00:00
27 lines
No EOL
850 B
C#
27 lines
No EOL
850 B
C#
using Cirno.Scripts.Enums;
|
|
using Godot;
|
|
using Godot.Collections;
|
|
|
|
namespace Cirno.Scripts.Resources.Roguelite;
|
|
|
|
[GlobalClass]
|
|
public partial class RogueliteRoomResource : Resource
|
|
{
|
|
[Export] public StringName RoomName { get; set; }
|
|
[Export] public RoomType Type { get; set; } = RoomType.Regular;
|
|
[Export] public StringName ScenePath { get; set; }
|
|
[Export] public Vector2I Size { get; set; } = new(1, 1);
|
|
|
|
[Export] public Array<Vector2I> DoorGridPositions { get; set; } = [];
|
|
|
|
[Export] public Array<EnemyResource> SpawnableEnemies { get; set; }
|
|
|
|
[Export] public DoorDirections DoorDirections { get; set; }
|
|
|
|
public bool HasDoors(DoorDirections required) => (DoorDirections & required) == required;
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{RoomName} {Type} {Size.X}x{Size.Y}";
|
|
}
|
|
} |