2024-03-16 19:45:43 +02:00
|
|
|
# Store
|
2024-03-17 00:05:55 +02:00
|
|
|
**Inherits:** [RefCounted](https://docs.godotengine.org/de/4.x/classes/class_refcounted.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 saving and loading data to and from a file.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
| Name | Type | Default |
|
|
|
|
| ------------------------------ | ------------------------------------------------------------------------- | ------- |
|
|
|
|
| [_loaded](#prop--loaded) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | `false` |
|
|
|
|
| [_save_path](#prop--save-path) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | `null` |
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
|
|
|
| Returns | Name |
|
|
|
|
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
|
|
| void | [clear](#clear) ( ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [create_dict](#create-dict) ( ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [is_loaded](#is-loaded) ( ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [load_local](#load-local) ( path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [save_local](#save-local) ( path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
|
|
|
| void | [use_dict](#use-dict) ( dict: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) |
|
|
|
|
|
2024-03-17 00:05:55 +02:00
|
|
|
## Signals
|
|
|
|
|
|
|
|
### on_loaded ( ) {#on-loaded}
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Signal emitted when the data is loaded.
|
2024-03-17 00:05:55 +02:00
|
|
|
|
|
|
|
### on_saved ( ) {#on-saved}
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Signal emitted when the data is saved.
|
2024-03-17 00:05:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
## Constants
|
|
|
|
|
2024-03-17 00:05:55 +02:00
|
|
|
### VariantSerializer = `<Object>` {#const-VariantSerializer}
|
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-16 19:45:43 +02:00
|
|
|
## Property Descriptions
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### _loaded: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop--loaded}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### _save_path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop--save-path}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
|
|
|
## Method Descriptions
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### clear ( ) -> void {#clear}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Resets the data to its default state.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### create_dict ( ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#create-dict}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### is_loaded ( ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#is-loaded}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Returns true if the data has been loaded.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### load_local (path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#load-local}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### save_local (path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#save-local}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### use_dict (dict: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) -> void {#use-dict}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|