do some changes with XLib and started working on main menu
This commit is contained in:
20
SaveManager/Config.gd
Normal file
20
SaveManager/Config.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Node
|
||||
|
||||
const ConfigPath = "user://config.tres"
|
||||
|
||||
func saveConfigs():
|
||||
var NewConfig = Config.new()
|
||||
NewConfig.username = MainGame.username
|
||||
NewConfig.language = MainGame.loadedLanguage
|
||||
|
||||
var sc = ResourceSaver.save(NewConfig, ConfigPath)
|
||||
|
||||
func loadConfig() -> Config:
|
||||
if ResourceLoader.exists(ConfigPath):
|
||||
var LoadedConfig = load(ConfigPath)
|
||||
if LoadedConfig:
|
||||
return LoadedConfig
|
||||
|
||||
return Config.new()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user