![]() |
ManiaMap.Godot
Procedural generation of metroidvania style maps for Godot .NET.
|
Provides a reference to a room scene and information for the room required by the procedural generator. More...
Public Member Functions | |
override void | _ValidateProperty (Godot.Collections.Dictionary property) |
RoomTemplate | GetMMRoomTemplate () |
Returns the ManiaMap room template used by the procedural generator. More... | |
string | GetScenePath () |
Returns the controlling associated scene path. The uid:// path is prioritized first, then the scene path. More... | |
void | Initialize (IRoomNode room) |
Sets the scene paths and serialized text to the room template based on the specified room. More... | |
PackedScene | LoadScene () |
Loads and returns the referenced scene. More... | |
Task< PackedScene > | LoadSceneAsync (bool useSubThreads=false) |
Asynchronously loads and returns the referenced scene. More... | |
Properties | |
bool | EditId [getset] |
If true, the Id property becomes editable in the inspector. More... | |
int | Id = Rand.GetRandomId() [getset] |
The room template's unique ID. More... | |
string | ScenePath [getset] |
The associated scene's path. More... | |
string | SceneUidPath [getset] |
The associated scene's uid:// path. More... | |
string | SerializedText [getset] |
The serialized text for the ManiaMap room template. More... | |
string | TemplateName = "<None>" [getset] |
The template name. More... | |
Private Member Functions | |
void | SetValidatedField< T > (ref T field, T value) |
Private Attributes | |
bool | _editId |
Provides a reference to a room scene and information for the room required by the procedural generator.
Definition at line 14 of file RoomTemplateResource.cs.
override void _ValidateProperty | ( | Godot.Collections.Dictionary | property | ) |
Definition at line 54 of file RoomTemplateResource.cs.
RoomTemplate GetMMRoomTemplate | ( | ) |
Returns the ManiaMap room template used by the procedural generator.
RoomTemplateNotInitializedException | Thrown if the serialized text is null or whitespace, indicating the template has not been initialized. |
Definition at line 90 of file RoomTemplateResource.cs.
string GetScenePath | ( | ) |
Returns the controlling associated scene path. The uid://
path is prioritized first, then the scene path.
RoomTemplateNotInitializedException | Thrown if a scene path is null or whitespace, indicating that the template has not been initialized. |
PathDoesNotExistException | Thrown if both the uid:// path and scene path do not exist per the resource loader. |
Definition at line 104 of file RoomTemplateResource.cs.
void Initialize | ( | IRoomNode | room | ) |
Sets the scene paths and serialized text to the room template based on the specified room.
room | The room to associate with the template. |
Definition at line 74 of file RoomTemplateResource.cs.
PackedScene LoadScene | ( | ) |
Loads and returns the referenced scene.
Definition at line 121 of file RoomTemplateResource.cs.
Task< PackedScene > LoadSceneAsync | ( | bool | useSubThreads = false | ) |
Asynchronously loads and returns the referenced scene.
Definition at line 129 of file RoomTemplateResource.cs.
|
private |
Definition at line 48 of file RoomTemplateResource.cs.
|
private |
Definition at line 16 of file RoomTemplateResource.cs.
|
getset |
If true, the Id property becomes editable in the inspector.
Definition at line 20 of file RoomTemplateResource.cs.
|
getset |
The room template's unique ID.
Definition at line 25 of file RoomTemplateResource.cs.
|
getset |
The associated scene's path.
Definition at line 35 of file RoomTemplateResource.cs.
|
getset |
The associated scene's uid://
path.
Definition at line 40 of file RoomTemplateResource.cs.
|
getset |
The serialized text for the ManiaMap room template.
Definition at line 46 of file RoomTemplateResource.cs.
|
getset |
The template name.
Definition at line 30 of file RoomTemplateResource.cs.