class_name GlobalConfig extends Resource

# .res would be binary encoded, .tres is text encoded
const RES_FILE_FORMAT = ".tres"

const CONFIG_FILE_NAME = "config" 

const DEBUG = true
#const DEBUG = false

const CANVAS_LAYER_VIGNETTE = 1000
const CANVAS_LAYER_PROP_INSPECTOR = 100
const CANVAS_LAYER_UI = 99
const CANVAS_LAYER_FG = 50
const CANVAS_LAYER_BG = -100

const COLOR_BOARDER = Color.BLACK

const _ART_RESOURCE_BASE_DIR = "res://asset/art/"

signal current_selected_save_changed
signal auto_save_seconds_changed

# 注意：编辑与新增属性时，需要同时编辑 GlobalConfigManager.gd 中的 load_data_res 方法
@export var game_total_seconds := 0  # 游戏总时长 
@export var game_rounds := 1  # 当前周目数
@export var current_selected_save := -1:  # 当前选定存档 id, -1 means no save selected
	set(val):
		current_selected_save = val
		current_selected_save_changed.emit()
@export var auto_save_seconds := 60:
	set(val):
		auto_save_seconds = val
		auto_save_seconds_changed.emit()
