Added SoundManager
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
class_name CSaveManager
|
||||
extends Node
|
||||
|
||||
|
||||
@export var save_file_path := "user://save.bin"
|
||||
@export var save_file_pass := "save_file_data"
|
||||
|
||||
|
||||
const WEAPONS : Array[WeaponData] = [
|
||||
preload("res://game/data/weapons/cannon_data.tres"),
|
||||
preload("res://game/data/weapons/gatling_data.tres"),
|
||||
@@ -13,9 +18,6 @@ const WEAPONS : Array[WeaponData] = [
|
||||
preload("res://game/data/weapons/tesla_data.tres"),
|
||||
]
|
||||
|
||||
const SAVE_FILE = "user://save.bin"
|
||||
const SAVE_FILE_PASS = "save_file_data"
|
||||
|
||||
const CATEGORY_GAME = "game"
|
||||
const GAME_SEED = "seed"
|
||||
const GAME_AREA_INDEX = "current_area_index"
|
||||
@@ -53,7 +55,7 @@ func save() -> void:
|
||||
_set_game_values()
|
||||
_set_player_values()
|
||||
|
||||
_save_file.save_encrypted_pass(SAVE_FILE, SAVE_FILE_PASS)
|
||||
_save_file.save_encrypted_pass(save_file_path, save_file_pass)
|
||||
|
||||
|
||||
func new_game(game_seed: String) -> void:
|
||||
@@ -68,7 +70,7 @@ func delete_game_data() -> void:
|
||||
|
||||
|
||||
func _load() -> void:
|
||||
if _save_file.load_encrypted_pass(SAVE_FILE, SAVE_FILE_PASS) == OK:
|
||||
if _save_file.load_encrypted_pass(save_file_path, save_file_pass) == OK:
|
||||
_process_save_file()
|
||||
|
||||
save()
|
||||
|
||||
Reference in New Issue
Block a user