immersive-home/docs/reference/StateMachine.md

56 lines
2.6 KiB
Markdown
Raw Normal View History

2024-03-16 19:45:43 +02:00
# StateMachine
**Inherits:** [Node](https://docs.godotengine.org/de/4.x/classes/class_node.html)
2024-03-16 19:45:43 +02:00
2024-03-17 01:14:31 +02:00
## Description
2024-03-16 19:45:43 +02:00
2024-03-17 01:14:31 +02:00
Abstract class for a state machine
2024-03-16 19:45:43 +02:00
## Properties
2024-03-17 01:14:31 +02:00
| Name | Type | Default |
| ------------------------------------ | ------------------------------------------------------------------------------- | ------- |
| [current_state](#prop-current-state) | [Node](https://docs.godotengine.org/de/4.x/classes/class_node.html) | |
| [states](#prop-states) | [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) | |
2024-03-16 19:45:43 +02:00
## Methods
| Returns | Name |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| void | [_ready](#-ready) ( ) |
| void | [change_to](#change-to) ( new_state: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) |
| [Node](https://docs.godotengine.org/de/4.x/classes/class_node.html) | [get_state](#get-state) ( state_name: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) |
## Signals
### changed (state_name: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) , old_state: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#changed}
No description provided yet.
2024-03-17 01:14:31 +02:00
2024-03-16 19:45:43 +02:00
## Property Descriptions
2024-03-17 01:14:31 +02:00
### current_state: [Node](https://docs.godotengine.org/de/4.x/classes/class_node.html) {#prop-current-state}
2024-03-16 19:45:43 +02:00
No description provided yet.
2024-03-17 01:14:31 +02:00
### states: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) {#prop-states}
2024-03-16 19:45:43 +02:00
No description provided yet.
## Method Descriptions
2024-03-17 01:14:31 +02:00
### _ready ( ) -> void {#-ready}
2024-03-16 19:45:43 +02:00
No description provided yet.
2024-03-17 01:14:31 +02:00
### change_to (new_state: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) -> void {#change-to}
2024-03-16 19:45:43 +02:00
2024-03-17 01:14:31 +02:00
Change the current state to the new state
2024-03-16 19:45:43 +02:00
2024-03-17 01:14:31 +02:00
### get_state (state_name: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) -> [Node](https://docs.godotengine.org/de/4.x/classes/class_node.html) {#get-state}
2024-03-16 19:45:43 +02:00
2024-03-17 01:14:31 +02:00
Get the state with the given name