Adjusting gavel animation player
This commit is contained in:
parent
5601b8b7c3
commit
f740d83dcc
2 changed files with 6 additions and 7 deletions
10
desk.tscn
10
desk.tscn
|
|
@ -86,7 +86,7 @@ animations = [{
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": &"Hover",
|
"name": &"Hover",
|
||||||
"speed": 24.0
|
"speed": 15.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
|
@ -117,7 +117,7 @@ animations = [{
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": &"Press",
|
"name": &"Press",
|
||||||
"speed": 24.0
|
"speed": 20.0
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
|
@ -140,7 +140,7 @@ animations = [{
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": &"Unhover",
|
"name": &"Unhover",
|
||||||
"speed": 20.0
|
"speed": 15.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8sdgr"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8sdgr"]
|
||||||
|
|
@ -174,10 +174,8 @@ volume_db = 3.0
|
||||||
[node name="GavelAnimations" type="AnimatedSprite2D" parent="Gavel"]
|
[node name="GavelAnimations" type="AnimatedSprite2D" parent="Gavel"]
|
||||||
position = Vector2(240, 210)
|
position = Vector2(240, 210)
|
||||||
sprite_frames = SubResource("SpriteFrames_g470s")
|
sprite_frames = SubResource("SpriteFrames_g470s")
|
||||||
animation = &"Unhover"
|
animation = &"Press"
|
||||||
autoplay = "Idle"
|
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")]
|
[node name="Numpad" type="Node2D" parent="." node_paths=PackedStringArray("progress_bar", "reminder_timer", "error_audio_player", "success_audio_player")]
|
||||||
position = Vector2(640, 570)
|
position = Vector2(640, 570)
|
||||||
|
|
|
||||||
1
gavel.gd
1
gavel.gd
|
|
@ -39,6 +39,7 @@ func _on_texture_button_mouse_entered() -> void:
|
||||||
func _on_texture_button_mouse_exited() -> void:
|
func _on_texture_button_mouse_exited() -> void:
|
||||||
#if $TextureButton.pressed:
|
#if $TextureButton.pressed:
|
||||||
$GavelAnimations.play("Unhover")
|
$GavelAnimations.play("Unhover")
|
||||||
|
await $GavelAnimations.animation_finished
|
||||||
$GavelAnimations.play("Idle")
|
$GavelAnimations.play("Idle")
|
||||||
#else:
|
#else:
|
||||||
#$GavelAnimations.play("Hover", -1.0)
|
#$GavelAnimations.play("Hover", -1.0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue