update
This commit is contained in:
@@ -32,13 +32,13 @@ func apply_settings() -> void:
|
||||
sfx.set_music_volume(profile.settings.music)
|
||||
set_language(profile.settings.language)
|
||||
Style.font_scale = 1.2 if profile.settings.get("big_font", false) else 1.0
|
||||
Style.animations = bool(profile.settings.get("animations", true))
|
||||
theme = Style.make_theme()
|
||||
|
||||
|
||||
## Neues Profil: Sammlung und Fortschritt werden verworfen.
|
||||
func reset_profile() -> void:
|
||||
profile = Profile.starter()
|
||||
clear_battle_save()
|
||||
save()
|
||||
apply_settings()
|
||||
|
||||
@@ -54,6 +54,9 @@ func show_screen(s: Control) -> void:
|
||||
s.app = self
|
||||
s.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
add_child(s)
|
||||
if Style.animations:
|
||||
s.modulate.a = 0.0
|
||||
create_tween().tween_property(s, "modulate:a", 1.0, 0.15)
|
||||
if pad_mode:
|
||||
focus_first_button.call_deferred()
|
||||
|
||||
@@ -107,16 +110,6 @@ func save() -> void:
|
||||
profile.save(save_path)
|
||||
|
||||
|
||||
## Datei für einen unterbrochenen Kampf (neben dem Spielstand).
|
||||
func battle_save_path() -> String:
|
||||
return save_path.get_basename() + "_kampf.json"
|
||||
|
||||
|
||||
func clear_battle_save() -> void:
|
||||
if FileAccess.file_exists(battle_save_path()):
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path(battle_save_path()))
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if net != null and net.is_inside_tree():
|
||||
net.leave()
|
||||
|
||||
Reference in New Issue
Block a user