diff options
| -rw-r--r-- | docs/index.html | 2 | ||||
| -rw-r--r-- | docs/index.pck | bin | 1947540 -> 1947876 bytes | |||
| -rw-r--r-- | docs/index.service.worker.js | 2 | ||||
| -rw-r--r-- | root.gd | 13 |
4 files changed, 14 insertions, 3 deletions
diff --git a/docs/index.html b/docs/index.html index 83509ce..a7cedc0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -112,7 +112,7 @@ body { <script src="index.js"></script> <script> -const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1947540,"index.wasm":38034280},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"}; +const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1947876,"index.wasm":38034280},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"}; const GODOT_THREADS_ENABLED = false; const engine = new Engine(GODOT_CONFIG); diff --git a/docs/index.pck b/docs/index.pck Binary files differindex 2a0174a..cd19351 100644 --- a/docs/index.pck +++ b/docs/index.pck diff --git a/docs/index.service.worker.js b/docs/index.service.worker.js index 885e340..3f0bebe 100644 --- a/docs/index.service.worker.js +++ b/docs/index.service.worker.js @@ -4,7 +4,7 @@ // Incrementing CACHE_VERSION will kick off the install event and force // previously cached resources to be updated from the network. /** @type {string} */ -const CACHE_VERSION = '1763149094|21932021128'; +const CACHE_VERSION = '1763150473|23312019331'; /** @type {string} */ const CACHE_PREFIX = 'MobileMetroidvan-sw-cache-'; const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION; @@ -2,11 +2,20 @@ class_name Root extends Node2D @export var initial_level: PackedScene +var save_state_path = "user://save_state.cfg" +var save_state = ConfigFile.new() # Called when the node enters the scene tree for the first time. func _ready() -> void: var level = initial_level.instantiate() add_child(level) + + # Testing + save_state.load(save_state_path) + print("loaded test_item: ", save_state.get_value("items", "test_item")) + save_state.set_value("items", "test_item", true) + save_state.save(save_state_path) + print(OS.get_data_dir()) # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(_delta: float) -> void: @@ -19,4 +28,6 @@ func change_level(level_name: String): var next_level = level.instantiate() add_child(next_level) - + +func save(): + save_state.save("user://save_state.cfg") |
