A subclass of Interactive that operates over a Godot node. It makes using a Godot node's properties and metadata easier. See the relevant wiki sectionfor details.
More...
|
| InteractiveNode (OffsetStopwatch stopwatch, Node nodeMarker) |
| Creates a new instance of InteractiveNode for a given Stopwatch and Node
|
|
bool | TryGetMarkerMeta (string name, out Variant meta) |
| Attempts to get the value of a metadata entry with a specified name if it exists and assigns it to the meta reference variable.
|
|
bool | TryGetMarkerMeta<[MustBeVariant] T > (string name, out T meta) |
| Version of TryGetMeta(string, out Variant) that outputs the metadata entry value as a specified type T .
|
|
void | SetMarkerMeta (string name, Variant value) |
| Sets the metadata entry belonging to NodeMarker with the given name to the specified value.
|
|
| Interactive (OffsetStopwatch clock, object runner=null) |
| Creates a new instance of Interactive that will run on the given OffsetStopwatch.
|
|
virtual void | Initialize () |
| Interactive initialization method that initializes the interactive after the constructor runs, in case such method is needed.
By default, this method is only called once after the object's constructor runs. Initialize() typically shouldn't be called more than once for the same Interactive instance.
|
|
virtual void | Start () |
| The interactive's start method. This method is called every time the user starts or restarts the interactive, and it's a great place to put code that will be run after initialization, but just before the interactive starts.
|
|
virtual void | Stop () |
| The interactive's stop method. This method is called right after the user stops or exits the interactive.
|
|
new void | Dispose () |
| Disposes of this Interactive instance. This method is a great place to free up resources being used by the interactive instance, especially right before the interactive itself gets freed from memory.
|
|
|
static string | GetTypeNameFromMarker (Node nodeMarker) |
| Returns the type name of an InteractiveNode defined in its node marker.
The type name should be defined in the marker's metadata with the entry name type .
|
|
static Interactive | GetHandlerFromMarker (Node nodeMarker) |
| Returns an interactive node's handler/operator instance corresponding to a given interactive node marker. If it can't be found, this method returns null.
The handler/operator instance returned is the first found object whose type is Interactive and is a child of the given node marker.
This method is mainly intended to be used for interactive node handlers that have ParentedToNodeMarker set to true.
|
|
|
static readonly string | NODE_MARKER_NAME_PREFIX = "_Interactive" |
| What an interactive's node marker name should begin with.
|
|
|
Node | NodeMarker [get] |
| The node which indicates that its parent node is the root node of an interactive. Its name should begin with _Interactive
|
|
Node | RootNode [get] |
| The interactive's root node.
|
|
bool | ParentedToNodeMarker [get, set] |
| Whether or not this interactive node handler is parented to NodeMarker.
|
|
bool | IsInitialized [get, protected set] |
| Whether or not Initialize has been called once already.
|
|
bool | IsRunning [get, protected set] |
| Whether or not the interactive is running (e.g. after Start has been called).
|
|
OffsetStopwatch | Clock [get] |
| The OffsetStopwatch that the Interactive will run on. This stopwatch can be used to synchronize the Interactive's various operations to whatever the current time on this stopwatch is.
|
|
|
object | Runner |
| The object that's running this interactive.
|
|
A subclass of Interactive that operates over a Godot node. It makes using a Godot node's properties and metadata easier. See the relevant wiki section
for details.
◆ InteractiveNode()
Jumpvalley.Levels.Interactives.InteractiveNode.InteractiveNode |
( |
OffsetStopwatch | stopwatch, |
|
|
Node | nodeMarker ) |
|
inline |
Creates a new instance of InteractiveNode for a given Stopwatch and Node
- Parameters
-
stopwatch | The stopwatch to bind the interactive to |
node | The node to operate over |
◆ GetHandlerFromMarker()
static Interactive Jumpvalley.Levels.Interactives.InteractiveNode.GetHandlerFromMarker |
( |
Node | nodeMarker | ) |
|
|
inlinestatic |
Returns an interactive node's handler/operator instance corresponding to a given interactive node marker. If it can't be found, this method returns null.
The handler/operator instance returned is the first found object whose type is Interactive and is a child of the given node marker.
This method is mainly intended to be used for interactive node handlers that have ParentedToNodeMarker set to true.
- Returns
◆ GetTypeNameFromMarker()
static string Jumpvalley.Levels.Interactives.InteractiveNode.GetTypeNameFromMarker |
( |
Node | nodeMarker | ) |
|
|
inlinestatic |
Returns the type name of an InteractiveNode defined in its node marker.
The type name should be defined in the marker's metadata with the entry name type
.
- Returns
◆ SetMarkerMeta()
void Jumpvalley.Levels.Interactives.InteractiveNode.SetMarkerMeta |
( |
string | name, |
|
|
Variant | value ) |
|
inline |
Sets the metadata entry belonging to NodeMarker with the given name to the specified value.
- Parameters
-
name | The name of the metadata entry |
value | The value to set the metadata entry to |
◆ TryGetMarkerMeta()
bool Jumpvalley.Levels.Interactives.InteractiveNode.TryGetMarkerMeta |
( |
string | name, |
|
|
out Variant | meta ) |
|
inline |
Attempts to get the value of a metadata entry with a specified name if it exists and assigns it to the meta reference variable.
- Parameters
-
name | The name of the metadata entry |
meta | The reference variable where the metadata entry value should be stored |
- Returns
true
if the metadata entry under the given name was found and grabbing its value was successful, false
otherwise.
◆ TryGetMarkerMeta<[MustBeVariant] T >()
Version of TryGetMeta(string, out Variant) that outputs the metadata entry value as a specified type T .
- Parameters
-
name | The name of the metadata entry |
meta | The reference variable where the metadata entry value should be stored |
- Returns
true
if the metadata entry under the given name was found and grabbing its value was successful, false
otherwise.
The documentation for this class was generated from the following file: