mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Map start system
This commit is contained in:
parent
4abab60eac
commit
7acc344986
11 changed files with 323 additions and 41 deletions
35
Scripts/Resources/DebugMenu/DebugMapSelectResource.cs
Normal file
35
Scripts/Resources/DebugMenu/DebugMapSelectResource.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources.DebugMenu;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class DebugMapSelectResource : Resource
|
||||
{
|
||||
[Export] public bool Enabled { get; private set; } = true;
|
||||
[Export] public string Path { get; private set; }
|
||||
|
||||
[Export] private string _name { get; set; }
|
||||
|
||||
[Export] public MapStartDataResource StartData { get; private set; }
|
||||
|
||||
[Export] public Texture2D Icon { get; private set; }
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(_name))
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(Path))
|
||||
{
|
||||
return Path.Split("/")[^1].Split(".")[0];
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
set => _name = value;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue