feat: Add new sprite animation assets, including 15sec and 30sec sprites, and initial animation and main scenes with supporting scripts.
This commit is contained in:
@@ -2,6 +2,7 @@ extends Control
|
||||
|
||||
@onready var animated_sprite_2d: AnimatedSprite2D = $StopPhase/AnimatedSprite2D
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
@onready var count_down_animation: AnimatedSprite2D = $CountDown/CountDownAnimation
|
||||
|
||||
#func _input(event: InputEvent) -> void:
|
||||
#if event.is_action_pressed("grab_item"):
|
||||
@@ -21,3 +22,9 @@ func stop_phase_anim_play():
|
||||
|
||||
func stop_phase_anim_stop():
|
||||
animated_sprite_2d.stop()
|
||||
|
||||
func play_countdown_30s():
|
||||
count_down_animation.play("30s")
|
||||
|
||||
func play_countdown_15s():
|
||||
count_down_animation.play("15s")
|
||||
|
||||
@@ -143,6 +143,18 @@ tracks/10/keys = {
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/11/type = "value"
|
||||
tracks/11/imported = false
|
||||
tracks/11/enabled = true
|
||||
tracks/11/path = NodePath("StopPhase/ColorRect:visible")
|
||||
tracks/11/interp = 1
|
||||
tracks/11/loop_wrap = true
|
||||
tracks/11/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bbp28"]
|
||||
resource_name = "ready-go"
|
||||
@@ -304,6 +316,18 @@ tracks/3/keys = {
|
||||
"update": 1,
|
||||
"values": [true, false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("StopPhase/ColorRect:visible")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 4),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [true, false]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_emg7w"]
|
||||
_data = {
|
||||
@@ -391,6 +415,17 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="StopPhase" unique_id=1569614215]
|
||||
modulate = Color(1, 1, 1, 0.1764706)
|
||||
z_index = -1
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(1, 0.7294118, 0.09019608, 1)
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="StopPhase" unique_id=159562463]
|
||||
z_index = -1
|
||||
layout_mode = 1
|
||||
@@ -415,5 +450,19 @@ position = Vector2(671, 364)
|
||||
sprite_frames = ExtResource("24_u10lt")
|
||||
animation = &"stop-phase"
|
||||
|
||||
[node name="CountDown" type="Control" parent="." unique_id=247940669]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CountDownAnimation" type="AnimatedSprite2D" parent="CountDown" unique_id=1053910485]
|
||||
position = Vector2(683, 360)
|
||||
scale = Vector2(0.75, 0.75)
|
||||
sprite_frames = ExtResource("24_u10lt")
|
||||
animation = &"15s"
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1614214519]
|
||||
libraries/ = SubResource("AnimationLibrary_emg7w")
|
||||
|
||||
@@ -1916,6 +1916,15 @@ func _on_global_timer_updated(time_remaining: float):
|
||||
var minutes = int(time_remaining) / 60
|
||||
var seconds = int(time_remaining) % 60
|
||||
timer_label.text = "%d:%02d" % [minutes, seconds]
|
||||
|
||||
# Trigger countdown animations (30s and 15s)
|
||||
if int(time_remaining) == 30 and int(time_remaining + 0.1) > 30:
|
||||
if vfx_manager and vfx_manager.has_method("play_countdown_30s"):
|
||||
vfx_manager.play_countdown_30s()
|
||||
elif int(time_remaining) == 15 and int(time_remaining + 0.1) > 15:
|
||||
if vfx_manager and vfx_manager.has_method("play_countdown_15s"):
|
||||
vfx_manager.play_countdown_15s()
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func sync_game_end_stop_n_go(winner_id: int):
|
||||
print("[STOP n GO] Game ended! Winner: ", winner_id)
|
||||
|
||||
+17
-29
@@ -118,9 +118,9 @@ material = SubResource("ShaderMaterial_j8jky")
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 63.731766
|
||||
offset_left = 29.731762
|
||||
offset_top = -200.62561
|
||||
offset_right = 214.42894
|
||||
offset_right = 180.42894
|
||||
offset_bottom = -15.877472
|
||||
grow_vertical = 2
|
||||
rotation = -0.10297442
|
||||
@@ -131,9 +131,8 @@ clip_contents = true
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 34.000004
|
||||
offset_top = -190.23553
|
||||
offset_right = 250.0
|
||||
offset_right = 216.0
|
||||
offset_bottom = 25.764465
|
||||
grow_vertical = 2
|
||||
rotation = -0.10297442
|
||||
@@ -1031,9 +1030,9 @@ texture = ExtResource("9_6gcb6")
|
||||
|
||||
[node name="PlayeBoardPanelName" type="PanelContainer" parent="." unique_id=1458381676]
|
||||
material = SubResource("ShaderMaterial_j8jky")
|
||||
offset_left = 44.0
|
||||
offset_left = 9.999996
|
||||
offset_top = 113.710526
|
||||
offset_right = 216.29385
|
||||
offset_right = 182.29385
|
||||
offset_bottom = 153.37068
|
||||
rotation = -0.10297442
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_playerboard")
|
||||
@@ -1042,9 +1041,9 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_playerboard")
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 50.718987
|
||||
offset_left = 16.718983
|
||||
offset_top = -244.58023
|
||||
offset_right = 133.719
|
||||
offset_right = 99.718994
|
||||
offset_bottom = -208.58023
|
||||
grow_vertical = 2
|
||||
rotation = -0.10297442
|
||||
@@ -1056,9 +1055,9 @@ text = "Guest"
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 170.71896
|
||||
offset_left = 136.71896
|
||||
offset_top = -258.02036
|
||||
offset_right = 210.71896
|
||||
offset_right = 176.71896
|
||||
offset_bottom = -222.02036
|
||||
grow_vertical = 2
|
||||
rotation = -0.10297442
|
||||
@@ -1097,10 +1096,10 @@ layout_mode = 2
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 84.0
|
||||
offset_top = -7.0
|
||||
offset_right = 229.0
|
||||
offset_bottom = 29.0
|
||||
offset_left = 32.0
|
||||
offset_top = 2.241272
|
||||
offset_right = 177.0
|
||||
offset_bottom = 38.241272
|
||||
grow_vertical = 2
|
||||
rotation = -0.10297442
|
||||
theme_override_styles/panel = SubResource("StyleBoxTexture_tel4y")
|
||||
@@ -1131,10 +1130,10 @@ layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxTexture_j8jky")
|
||||
|
||||
[node name="GoalsTimer" type="PanelContainer" parent="." unique_id=2106663301]
|
||||
offset_left = 235.8717
|
||||
offset_top = 338.0481
|
||||
offset_right = 267.8717
|
||||
offset_bottom = 371.04816
|
||||
offset_left = 183.8717
|
||||
offset_top = 347.28937
|
||||
offset_right = 215.8717
|
||||
offset_bottom = 380.28943
|
||||
rotation = -0.10297442
|
||||
|
||||
[node name="TimerLabel" type="Label" parent="GoalsTimer" unique_id=466345203]
|
||||
@@ -1879,17 +1878,6 @@ custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
text = "Back"
|
||||
|
||||
[node name="SettingsBtn" type="Button" parent="." unique_id=1964422444]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -78.0
|
||||
offset_top = 8.0
|
||||
offset_right = -30.0
|
||||
offset_bottom = 56.0
|
||||
grow_horizontal = 0
|
||||
text = "⚙"
|
||||
|
||||
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]
|
||||
[connection signal="pressed" from="PauseMenu/Panel/VBox/ResumeBtn" to="." method="_on_resume_pressed"]
|
||||
[connection signal="pressed" from="PauseMenu/Panel/VBox/HowToPlayBtn" to="." method="_on_how_to_play_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user