add: Registry

This commit is contained in:
h z
2025-02-05 12:38:51 +00:00
parent 4a6cb141f8
commit 148b0a0f48
5 changed files with 161 additions and 19 deletions

26
AssetInfo.cs Normal file
View File

@@ -0,0 +1,26 @@
namespace Hangman.SDK.Generators;
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
public struct AssetInfo
{
public INamedTypeSymbol Symbol;
public string Path;
public ClassDeclarationSyntax DeclarationSyntax;
public string ClassName;
public string ClassFullName;
public string GodotPath {
get
{
string rs = Path.Replace("\\", "/").Replace(" ", "%20");
rs = rs.Substring(rs.IndexOf("Assets", StringComparison.Ordinal));
return "res://" + rs;
}
}
public string ScenePath => GodotPath.Replace(".cs", ".tscn");
}