Elements
Inherits: Resource < RefCounted < Object
This class is made from autogenerating a script from strings so an element enum can be dynamically changed when interacting with the element creation editor tab.
It contains the AllElements Enum and a few helper functions.
Static Methods
| Return Type | Method |
|---|---|
| Array[StringName] | GetElementNames() |
| AllElements | GetFromName(StringName name) |
Properties
| Type | Property |
|---|---|
| Enum | AllElements |
Static Method Descriptions
Array[StringName] GetElementNames()
Returns a Godot Array of all of the existing elements in AllElements as StringNames.
AllElements GetFromName(StringName name)
StrigName name- The name of the element to get the enum equivalent of.
Returns the AllElements equivalent of name.
Ex. GetFromName(&"SAND") would return AllElements.SAND.
Property Descriptions
Enum AllElements
An Enum containing every element created in the Element Editor tab. Dynamically changed when the Apply Changes button in the element tab is pressed.
It has some default values:
| Value |
|---|
| AIR |
| SAND |
| WATER |
| ACID |
| STONE |
| WALL |