Adjusting gavel animation player

This commit is contained in:
vandomej 2025-10-05 19:44:12 -07:00
parent 5601b8b7c3
commit f740d83dcc
2 changed files with 6 additions and 7 deletions

View file

@ -86,7 +86,7 @@ animations = [{
}],
"loop": false,
"name": &"Hover",
"speed": 24.0
"speed": 15.0
}, {
"frames": [{
"duration": 1.0,
@ -117,7 +117,7 @@ animations = [{
}],
"loop": false,
"name": &"Press",
"speed": 24.0
"speed": 20.0
}, {
"frames": [{
"duration": 1.0,
@ -140,7 +140,7 @@ animations = [{
}],
"loop": false,
"name": &"Unhover",
"speed": 20.0
"speed": 15.0
}]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8sdgr"]
@ -174,10 +174,8 @@ volume_db = 3.0
[node name="GavelAnimations" type="AnimatedSprite2D" parent="Gavel"]
position = Vector2(240, 210)
sprite_frames = SubResource("SpriteFrames_g470s")
animation = &"Unhover"
animation = &"Press"
autoplay = "Idle"
frame = 5
frame_progress = 1.0
[node name="Numpad" type="Node2D" parent="." node_paths=PackedStringArray("progress_bar", "reminder_timer", "error_audio_player", "success_audio_player")]
position = Vector2(640, 570)

View file

@ -39,6 +39,7 @@ func _on_texture_button_mouse_entered() -> void:
func _on_texture_button_mouse_exited() -> void:
#if $TextureButton.pressed:
$GavelAnimations.play("Unhover")
await $GavelAnimations.animation_finished
$GavelAnimations.play("Idle")
#else:
#$GavelAnimations.play("Hover", -1.0)