Launch fireworks when minigames end
This commit is contained in:
@@ -220,7 +220,7 @@ func _win() -> void:
|
||||
audio_player.stream = WIN_SOUND_FX
|
||||
audio_player.play()
|
||||
|
||||
fireworks.start()
|
||||
fireworks.play()
|
||||
await fireworks.finished
|
||||
|
||||
minigame_ui.play_kalulu_speech(win_kalulu_speech)
|
||||
|
||||
@@ -53,6 +53,7 @@ func _setup_minigame() -> void:
|
||||
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#ffd366"), Color("#a8f0d0"), Color("#7fc8ff")])
|
||||
berry_timer.start()
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://bwe3fp0vkpufb"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://bwe3fp0vkpufb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dsv0728uv1y5l" path="res://sources/minigames/crabs/crab/crab.gd" id="1_5hgg8"]
|
||||
[ext_resource type="AudioStream" uid="uid://1ibmtydnewa8" path="res://assets/minigames/crabs/audio/sfx/crab_random_6.mp3" id="2_gc7a0"]
|
||||
@@ -11,6 +11,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bgio7muqck2bu" path="res://sources/utils/auto_size_label.tscn" id="9_3nie6"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://n1ydrtdfm4p3" path="res://sources/minigames/crabs/crab/crab_animations.tres" id="10_c4r2k"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbtr0cyiapi3g" path="res://assets/minigames/minigame_ui/graphic/primary_text_box_outline.png" id="11_mgkmu"]
|
||||
[ext_resource type="PackedScene" uid="uid://cs6g7fhc0bjvh" path="res://sources/utils/fx/right_stars.tscn" id="12_2ax6s"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tnp5x"]
|
||||
|
||||
@@ -68,6 +69,19 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.6, 0.6)
|
||||
|
||||
[node name="WrongFX" parent="BackFX" instance=ExtResource("5_3sw4w")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="Body" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
@@ -128,7 +142,7 @@ scale = Vector2(1.8, 1.8)
|
||||
sprite_frames = ExtResource("10_c4r2k")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.55351526
|
||||
frame_progress = 0.16246976
|
||||
centered = false
|
||||
|
||||
[node name="FrontFX" type="Control" parent="."]
|
||||
@@ -139,18 +153,9 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="WrongFX" parent="FrontFX" instance=ExtResource("5_3sw4w")]
|
||||
[node name="Right_Stars" parent="FrontFX" instance=ExtResource("12_2ax6s")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
position = Vector2(184, 160)
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
|
||||
@@ -62,6 +62,7 @@ func _setup_minigame() -> void:
|
||||
# Launch the minigame
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#7fc8ff"), Color("#f5a8c8"), Color("#bca4ff")])
|
||||
_spawn_crabs()
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ var blocking_jellyfish: Array[Jellyfish] = []
|
||||
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#ffd366"), Color("#ffbf94"), Color("#f5a8c8")])
|
||||
spawn_timer.start()
|
||||
|
||||
|
||||
|
||||
@@ -74,6 +74,11 @@ func _setup_minigame() -> void:
|
||||
_update_label(0)
|
||||
|
||||
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#ffd366"), Color("#ffbf94"), Color("#7fc8ff")])
|
||||
|
||||
|
||||
func _highlight() -> void:
|
||||
for monkey: Monkey in monkeys:
|
||||
if _is_gp_right(monkey.stimulus):
|
||||
|
||||
@@ -102,6 +102,7 @@ func _find_stimuli_and_distractions() -> void:
|
||||
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#bca4ff"), Color("#f5a8c8"), Color("#ffbf94")])
|
||||
var possible_positions: Array[Vector2] = []
|
||||
for branch: Node in branches.get_children():
|
||||
for child: Node2D in branch.get_children():
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://pj0mlw24jayt" path="res://assets/minigames/parakeets/graphic/background_2.png" id="6_6ktwy"]
|
||||
[ext_resource type="Texture2D" uid="uid://di2qcv6jw8wh0" path="res://assets/minigames/parakeets/graphic/gauge_icon_parakeet_full.png" id="6_46vnr"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs16kbsvnsltg" path="res://assets/minigames/parakeets/graphic/background_3.png" id="7_k6xou"]
|
||||
[ext_resource type="Script" path="res://sources/minigames/parakeets/clouds_manager.gd" id="8_cy1rn"]
|
||||
[ext_resource type="Script" uid="uid://cgtd34f7vi2tj" path="res://sources/minigames/parakeets/clouds_manager.gd" id="8_cy1rn"]
|
||||
[ext_resource type="Texture2D" uid="uid://0p171y6thba8" path="res://assets/minigames/parakeets/graphic/tree.png" id="8_g6pid"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca2jljrk2wnjt" path="res://assets/minigames/parakeets/graphic/nest.png" id="9_0u6jo"]
|
||||
[ext_resource type="Texture2D" uid="uid://rx270y4n7tul" path="res://assets/minigames/parakeets/graphic/cloud_1.png" id="9_6ktwy"]
|
||||
|
||||
@@ -33,6 +33,11 @@ var color: Turtle.Colors
|
||||
@onready var crab: AnimatedSprite2D = %CrabAnimatedSprite2D
|
||||
|
||||
|
||||
func _start() -> void:
|
||||
super()
|
||||
fireworks.set_colors([Color("#ffd366"), Color("#bca4ff"), Color("#f5a8c8")])
|
||||
|
||||
|
||||
# Find and set the parameters of the minigame, like the number of lives or the victory conditions.
|
||||
func _setup_minigame() -> void:
|
||||
super._setup_minigame()
|
||||
|
||||
Reference in New Issue
Block a user