Fixing gavel animation
This commit is contained in:
parent
eae131ad08
commit
6298e2ad25
2 changed files with 4 additions and 0 deletions
|
|
@ -177,6 +177,8 @@ position = Vector2(240, 210)
|
||||||
sprite_frames = SubResource("SpriteFrames_g470s")
|
sprite_frames = SubResource("SpriteFrames_g470s")
|
||||||
animation = &"Press"
|
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)
|
||||||
|
|
|
||||||
2
gavel.gd
2
gavel.gd
|
|
@ -32,6 +32,8 @@ func _on_texture_button_button_down() -> void:
|
||||||
$TextureButton.mouse_default_cursor_shape = Control.CURSOR_DRAG
|
$TextureButton.mouse_default_cursor_shape = Control.CURSOR_DRAG
|
||||||
audio_player.play()
|
audio_player.play()
|
||||||
gavel_hit.emit()
|
gavel_hit.emit()
|
||||||
|
if $GavelAnimations.animation == "Press":
|
||||||
|
$GavelAnimations.frame = 0
|
||||||
$GavelAnimations.play("Press")
|
$GavelAnimations.play("Press")
|
||||||
|
|
||||||
func _on_texture_button_mouse_entered() -> void:
|
func _on_texture_button_mouse_entered() -> void:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue