extends Node2D var world: World var current_map_name: String var current_map_entry: String var current_direction: Vector2 var is_fading := false func set_outdoor() -> void: $Background/Outdoor.visible = true $Background/Indoor.visible = false func set_indoor() -> void: $Background/Indoor.visible = true $Background/Outdoor.visible = false func fade_out(duration: float = 0.4) -> void: is_fading = true $Fade/ColorRect.modulate.a = 0 $Fade.visible = true var tween := create_tween() tween.tween_property($Fade/ColorRect, "modulate", Color(1, 1, 1, 1), duration) await tween.finished func fade_in(duration: float = 0.4) -> void: $Fade/ColorRect.modulate.a = 1 $Fade.visible = true var tween := create_tween() tween.tween_property($Fade/ColorRect, "modulate", Color(1, 1, 1, 0), duration) await tween.finished $Fade.visible = false is_fading = false