ajout d'une animation de recharge et réparation du crash au chargement de chunk

This commit is contained in:
2026-01-16 12:28:36 +01:00
parent 74d2d0de3a
commit ff4feacea3
25 changed files with 431 additions and 236 deletions

View File

@@ -9,7 +9,6 @@ var on_animation = false
@onready var target : Control = get_parent()
var target_default_pos : Vector2
var target_default_modulate = Color.WHITE
@export_tool_button("Test Shake", "Callable") var shake_action = shake
@export_tool_button("Test Bounce", "Callable") var bounce_action = bounce
@@ -42,8 +41,8 @@ func fade_in(
target.visible = true
await add_tween(
"modulate",
target_default_modulate,
"modulate:a",
1.,
duration,
transition_type
).finished
@@ -58,8 +57,8 @@ func fade_out(
target.visible = true
await add_tween(
"modulate",
Color.TRANSPARENT,
"modulate:a",
0.,
duration,
transition_type
).finished
@@ -74,8 +73,8 @@ func disappear(
):
start_anim()
add_tween(
"modulate",
Color.TRANSPARENT,
"modulate:a",
0.,
duration,
transition_type
)
@@ -87,6 +86,7 @@ func disappear(
transition_type
).finished
target.visible = false
target.position = target_default_pos
end_anim()
@@ -96,11 +96,12 @@ func appear(
transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_LINEAR,
):
start_anim()
target.modulate = Color.TRANSPARENT
target.visible = true
target.modulate.a = 0.
add_tween(
"modulate",
target_default_modulate,
"modulate:a",
1.,
duration,
transition_type
).finished