Level Teleporters

This commit is contained in:
Marco 2025-09-10 16:16:05 +02:00
commit 7a8bb4311b
26 changed files with 581 additions and 410 deletions

View file

@ -1,4 +1,5 @@
using Godot;
using System.Linq;
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Resources;
@ -7,4 +8,14 @@ namespace Cirno.Scripts.Resources;
public partial class MapsDatabase : Resource
{
[Export] public Array<MapResource> Maps { get; set; }
public MapResource FindMap(StringName mapId)
{
return Maps.FirstOrDefault(x => x.MapId is not null && x.MapId.Equals(mapId));
}
public MapResource FindNextMap(StringName mapId)
{
return FindMap(FindMap(mapId).NextMap);
}
}