ManiaMap.Godot
Procedural generation of metroidvania style maps for Godot .NET.
PathRef.cs
1
using
Godot;
2
3
namespace
MPewsey.ManiaMapGodot
4
{
5
public
readonly
struct
PathRef
6
{
7
public
string
UidPath {
get
; }
8
public
string
ResPath {
get
; }
9
10
public
PathRef
(
string
uidPath,
string
resPath)
11
{
12
UidPath = uidPath;
13
ResPath = resPath;
14
}
15
16
public
string
GetLoadPath()
17
{
18
return
ResourceLoader.Exists(ResPath) ? ResPath : UidPath;
19
}
20
21
public
T Load<T>() where T :
class
22
{
23
return
ResourceLoader.Load<T>(GetLoadPath());
24
}
25
}
26
}
MPewsey.ManiaMapGodot
Definition:
AsyncResourceLoader.cs:6
MPewsey.ManiaMapGodot.PathRef
Definition:
PathRef.cs:6
addons
mpewsey.maniamap
scripts
runtime
PathRef.cs
Generated by
1.9.2