mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Level Teleporters
This commit is contained in:
parent
5e357e1a96
commit
7a8bb4311b
26 changed files with 581 additions and 410 deletions
27
Scripts/Utils/GlobalMapDatabase.cs
Normal file
27
Scripts/Utils/GlobalMapDatabase.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Utils;
|
||||
|
||||
public partial class GlobalMapDatabase : Node
|
||||
{
|
||||
|
||||
public static GlobalMapDatabase Instance { get; private set; }
|
||||
|
||||
[Export] public MapsDatabase Maps { get; private set; }
|
||||
|
||||
public MapResource FindMap(StringName mapId)
|
||||
{
|
||||
return Maps.FindMap(mapId);
|
||||
}
|
||||
|
||||
public MapResource FindNextMap(StringName mapId)
|
||||
{
|
||||
return Maps.FindNextMap(mapId); //FindMap(Maps.FindMap(mapId).NextMap);
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
1
Scripts/Utils/GlobalMapDatabase.cs.uid
Normal file
1
Scripts/Utils/GlobalMapDatabase.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cegjwc0h7qenj
|
||||
|
|
@ -17,6 +17,7 @@ public class SessionSettings
|
|||
public Godot.Collections.Dictionary<string, int> Items { get; set; } = new();
|
||||
|
||||
public int LevelNumber { get; set; } = 0;
|
||||
public StringName MapId { get; set; }
|
||||
|
||||
public float Health { get; set; }
|
||||
public float Shield { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue