fix #136 for good: fixing animation player skip handling
This commit is contained in:
parent
b7258e858b
commit
6fe6834541
|
|
@ -127,6 +127,7 @@ func _input(event):
|
|||
if event.is_action_pressed("ui_accept"):
|
||||
pick(curr_selection_id)
|
||||
elif event.is_action_pressed("skip"):
|
||||
$Meaning.stop()
|
||||
if selection_state == CARDS_SELECTED:
|
||||
picked_player.play("skip_pick", .1)
|
||||
random_player.play("skip_shuffle", .1)
|
||||
|
|
@ -135,9 +136,11 @@ func _input(event):
|
|||
transition()
|
||||
show_posts()
|
||||
elif selection_state == POSTS_SELECTED:
|
||||
for player:AnimationPlayer in anim_players + [picked_player, random_player]:
|
||||
player.play("ini")
|
||||
# I do not know, why process_frame won't work here, but this is workaround seems to prevent the notes from flashing the next selection.
|
||||
await(get_tree().create_timer(0.1).timeout)
|
||||
transition()
|
||||
for player in anim_players + [picked_player, random_player]:
|
||||
player.advance(10.0)
|
||||
elif selection_state == TRANSITION:
|
||||
show_posts()
|
||||
|
||||
|
|
@ -240,6 +243,8 @@ func pick_cards(id: int, repeat: bool):
|
|||
fill_card_slots(id)
|
||||
#State.transition_stage_to(self, true)
|
||||
selection_state = CARDS
|
||||
if id == Scenes.id.YOUTH_DRAEVEN and not repeat:
|
||||
$Meaning.play()
|
||||
else:
|
||||
Scenes.end_current_sequence()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
[gd_scene load_steps=70 format=3 uid="uid://brk4hjdf2x81a"]
|
||||
[gd_scene load_steps=72 format=3 uid="uid://brk4hjdf2x81a"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bdb6n10apk1en" path="res://logic-scenes/card_picker/card_picker.gd" id="1_pjntm"]
|
||||
[ext_resource type="Script" uid="uid://2loic2eeec5b" path="res://logic-scenes/board/card.gd" id="2_f4sp4"]
|
||||
[ext_resource type="Script" uid="uid://r12efqgk6t4n" path="res://logic-scenes/board/sticky-note.gd" id="3_f4sp4"]
|
||||
[ext_resource type="AudioStream" uid="uid://bakwypwhs7a5n" path="res://base-environments/youth_room/audio/why-does-it-mean.wav" id="4_ujc5a"]
|
||||
[ext_resource type="Script" uid="uid://c1oub0cs7cph6" path="res://dev-util/stereo-switch.gd" id="5_et74x"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_dinvx"]
|
||||
length = 0.001
|
||||
|
|
@ -1888,9 +1890,24 @@ metadata/_custom_type_script = "uid://r12efqgk6t4n"
|
|||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="thought_prompt"]
|
||||
layout_mode = 2
|
||||
offset_left = -225.0
|
||||
offset_top = -196.0
|
||||
offset_right = 225.0
|
||||
offset_bottom = -158.0
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -282.5
|
||||
offset_top = -288.0
|
||||
offset_right = 282.5
|
||||
offset_bottom = -239.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_type_variation = &"HeaderMedium"
|
||||
text = "Why does that story mean so much to me?"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Meaning" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("4_ujc5a")
|
||||
mix_target = 2
|
||||
bus = &"text"
|
||||
script = ExtResource("5_et74x")
|
||||
|
|
|
|||
Loading…
Reference in New Issue