make everything bigger in parakeets

This commit is contained in:
BimDav
2023-03-09 11:15:37 +01:00
parent 10c9d5b690
commit b3936aebc1
4 changed files with 166 additions and 170 deletions
+2
View File
@@ -55,6 +55,7 @@ func _on_animated_sprite_2d_animation_looped() -> void:
func fly_to(target: Vector2, duration: float) -> void:
animated_sprite.play("fly")
label.position.y = -195
var tween: = create_tween()
tween.set_trans(Tween.TRANS_SINE)
tween.set_ease(Tween.EASE_IN_OUT)
@@ -68,6 +69,7 @@ func happy() -> void:
func idle() -> void:
animated_sprite.play("idle_front")
label.position.y = -166
func sad() -> void:
+9 -12
View File
@@ -1,13 +1,9 @@
[gd_scene load_steps=10 format=3 uid="uid://cmoeum0oc0p2"]
[gd_scene load_steps=9 format=3 uid="uid://cmoeum0oc0p2"]
[ext_resource type="Script" path="res://sources/minigames/parakeets/parakeet.gd" id="1_p0nqk"]
[ext_resource type="SpriteFrames" uid="uid://wybpq21deku7" path="res://sources/minigames/parakeets/red_parakeet_animations.tres" id="2_05lo6"]
[ext_resource type="FontFile" uid="uid://b2l4jfylc1v41" path="res://assets/fonts/DidactGothic-Regular.ttf" id="5_k8sc4"]
[sub_resource type="LabelSettings" id="LabelSettings_chx0h"]
font = ExtResource("5_k8sc4")
font_size = 60
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2q8kg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aup5h"]
@@ -22,21 +18,22 @@ font_size = 60
script = ExtResource("1_p0nqk")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(1.5, 1.5)
scale = Vector2(2, 2)
sprite_frames = ExtResource("2_05lo6")
animation = &"sad"
animation = &"idle_front"
autoplay = "idle_front"
offset = Vector2(2.08165e-12, -82)
[node name="Label" type="Label" parent="."]
offset_left = -17.0
offset_top = -108.0
offset_right = 18.0
offset_bottom = -26.0
offset_left = -26.0
offset_top = -166.0
offset_right = 27.0
offset_bottom = -44.0
theme_override_fonts/font = ExtResource("5_k8sc4")
theme_override_font_sizes/font_size = 90
text = "A"
label_settings = SubResource("LabelSettings_chx0h")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Button" type="Button" parent="."]
offset_left = -91.0
@@ -27,13 +27,17 @@ const audio_streams: = [
@export var lesson_nb: = 4
@export var fly_duration: = 3.0
@onready var possible_positions_parent: = $GameRoot/PossiblePositions
@onready var branches: = $GameRoot/TreeTrunk/Branches
@onready var possible_start_positions_parent: = $GameRoot/FlyFrom
@onready var parakeets_node: = $GameRoot/Parakeets
@onready var nest_positions: Array[Vector2] = [$GameRoot/TreeNestFront/Position1.global_position, $GameRoot/TreeNestFront/Position2.global_position]
@onready var nest_positions: Array[Vector2] = [
$GameRoot/TreeTrunk/Branches/TreeBranch5/TreeNestBack/TreeNestFront/Position1.global_position,
$GameRoot/TreeTrunk/Branches/TreeBranch5/TreeNestBack/TreeNestFront/Position2.global_position
]
@onready var fly_away_positions: Array[Vector2] = [$GameRoot/FlyAway/Position1.global_position, $GameRoot/FlyAway/Position2.global_position]
@onready var audio_player: = $AudioStreamPlayer
var possible_branch_positions: Array[Vector2]
var parakeets: Array[Parakeet]
var selected: Array[Parakeet]
var state: = State.Locked
@@ -64,7 +68,7 @@ func _setup_minigame() -> void:
var settings: Dictionary = difficulty_settings[difficulty]
var pairs_count: int = settings.pairs_count
var pairs_count: int = min(settings.pairs_count, stimuli.size())
var possible_start_positions: Array = possible_start_positions_parent.get_children()
possible_start_positions.shuffle()
var stimuli2: = stimuli.duplicate()
@@ -96,7 +100,11 @@ func _find_stimuli_and_distractions() -> void:
func _start() -> void:
var possible_positions: = possible_positions_parent.get_children()
var possible_positions: Array[Vector2] = []
for branch in branches.get_children():
for child in branch.get_children():
if "Position" in child.name:
possible_positions.append(child.global_position)
possible_positions.shuffle()
await _flying_arrival(possible_positions)
_present_parakeets()
@@ -226,14 +234,14 @@ func _turn(parakeet: Parakeet, to_back: bool) -> void:
await parakeet.turn_to_front()
func _flying_arrival(to: Array) -> void:
func _flying_arrival(to: Array[Vector2]) -> void:
assert(parakeets.size() <= to.size(), "Some parakeets don't have a destination")
var coroutine: = Coroutine.new()
audio_player.stream = audio_streams[Audio.Fly]
audio_player.play()
coroutine.add_future(audio_player.finished)
for i in parakeets.size():
coroutine.add_future(parakeets[i].fly_to.bind(to[i].global_position, fly_duration))
coroutine.add_future(parakeets[i].fly_to.bind(to[i], fly_duration))
await coroutine.join()
for parakeet in parakeets:
parakeet.idle()
@@ -12,7 +12,7 @@
[node name="Parakeets" instance=ExtResource("1_oeg4r")]
script = ExtResource("2_x6xn5")
difficulty = 1
difficulty = 4
lesson_nb = 4
fly_duration = 3.0
max_number_of_lives = 5
@@ -39,204 +39,170 @@ anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -46.0
offset_top = -900.0
offset_right = 46.0
offset_right = 147.0
offset_bottom = 900.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("4_unuga")
[node name="TreeBranch" type="TextureRect" parent="GameRoot" index="2"]
[node name="Branches" type="Control" parent="GameRoot/TreeTrunk" index="0"]
anchors_preset = 0
offset_left = -1234.0
offset_right = -1194.0
offset_bottom = 40.0
[node name="TreeBranch" type="TextureRect" parent="GameRoot/TreeTrunk/Branches" index="0"]
layout_mode = 0
offset_left = 438.0
offset_top = 597.0
offset_right = 1262.0
offset_bottom = 637.0
offset_left = 462.0
offset_top = 676.0
offset_right = 1286.0
offset_bottom = 756.0
texture = ExtResource("5_46kss")
[node name="TreeBranch2" type="TextureRect" parent="GameRoot" index="3"]
[node name="Position" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch" index="0"]
anchors_preset = 0
offset_left = 109.0
offset_top = 1.0
offset_right = 149.0
offset_bottom = 41.0
[node name="Position2" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch" index="1"]
anchors_preset = 0
offset_left = 390.0
offset_top = 1.0
offset_right = 430.0
offset_bottom = 41.0
[node name="Position3" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch" index="2"]
anchors_preset = 0
offset_left = 658.0
offset_top = 1.0
offset_right = 698.0
offset_bottom = 41.0
[node name="TreeBranch2" type="TextureRect" parent="GameRoot/TreeTrunk/Branches" index="1"]
layout_mode = 0
offset_left = 1312.0
offset_top = 431.0
offset_right = 2187.0
offset_bottom = 471.0
offset_bottom = 511.0
texture = ExtResource("5_46kss")
[node name="TreeBranch3" type="TextureRect" parent="GameRoot" index="4"]
[node name="Position" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch2" index="0"]
anchors_preset = 0
offset_left = 203.0
offset_right = 292.0
offset_bottom = 21.0
[node name="Position2" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch2" index="1"]
anchors_preset = 0
offset_left = 517.0
offset_right = 557.0
offset_bottom = 40.0
[node name="Position3" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch2" index="2"]
anchors_preset = 0
offset_left = 794.0
offset_right = 834.0
[node name="TreeBranch3" type="TextureRect" parent="GameRoot/TreeTrunk/Branches" index="2"]
layout_mode = 0
offset_left = 1299.0
offset_top = 818.0
offset_right = 2283.0
offset_bottom = 858.0
offset_left = 1360.0
offset_top = 839.0
offset_right = 2344.0
offset_bottom = 919.0
texture = ExtResource("5_46kss")
[node name="TreeBranch4" type="TextureRect" parent="GameRoot" index="5"]
[node name="Position" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch3" index="0"]
anchors_preset = 0
offset_left = 130.0
offset_right = 170.0
offset_bottom = 40.0
[node name="Position2" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch3" index="1"]
anchors_preset = 0
offset_left = 420.0
offset_right = 460.0
offset_bottom = 40.0
[node name="Position3" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch3" index="2"]
anchors_preset = 0
offset_left = 689.0
offset_right = 729.0
offset_bottom = 40.0
[node name="Position4" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch3" index="3"]
anchors_preset = 0
offset_left = 902.0
offset_right = 942.0
offset_bottom = 40.0
[node name="TreeBranch4" type="TextureRect" parent="GameRoot/TreeTrunk/Branches" index="3"]
layout_mode = 0
offset_left = 498.0
offset_top = 1145.0
offset_right = 1307.0
offset_bottom = 1185.0
offset_bottom = 1225.0
texture = ExtResource("5_46kss")
[node name="TreeBranch5" type="TextureRect" parent="GameRoot" index="6"]
[node name="Position" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch4" index="0"]
anchors_preset = 0
offset_left = 163.0
offset_right = 203.0
offset_bottom = 40.0
[node name="Position2" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch4" index="1"]
anchors_preset = 0
offset_left = 514.0
offset_right = 554.0
offset_bottom = 40.0
[node name="TreeBranch5" type="TextureRect" parent="GameRoot/TreeTrunk/Branches" index="4"]
layout_mode = 0
offset_left = 1289.0
offset_top = 1502.0
offset_right = 2040.0
offset_bottom = 1542.0
offset_bottom = 1582.0
texture = ExtResource("5_46kss")
[node name="TreeNestBack" type="TextureRect" parent="GameRoot" index="7"]
visible = false
[node name="TreeNestBack" type="TextureRect" parent="GameRoot/TreeTrunk/Branches/TreeBranch5" index="0"]
layout_mode = 0
offset_left = 1557.0
offset_top = 1405.0
offset_right = 1847.0
offset_bottom = 1512.0
offset_left = 268.0
offset_top = -97.0
offset_right = 618.0
offset_bottom = 10.0
texture = ExtResource("6_g64mq")
[node name="PossiblePositions" type="Control" parent="GameRoot" index="8"]
[node name="TreeNestFront" type="TextureRect" parent="GameRoot/TreeTrunk/Branches/TreeBranch5/TreeNestBack" index="0"]
z_index = 1
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("7_3mibn")
[node name="Control" type="Control" parent="GameRoot/PossiblePositions" index="0"]
[node name="Position1" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch5/TreeNestBack/TreeNestFront" index="0"]
anchors_preset = 0
offset_left = 547.0
offset_top = 598.0
offset_right = 587.0
offset_bottom = 638.0
offset_left = 109.0
offset_top = 45.0
offset_right = 149.0
offset_bottom = 85.0
[node name="Control2" type="Control" parent="GameRoot/PossiblePositions" index="1"]
[node name="Position2" type="Control" parent="GameRoot/TreeTrunk/Branches/TreeBranch5/TreeNestBack/TreeNestFront" index="1"]
anchors_preset = 0
offset_left = 828.0
offset_top = 598.0
offset_right = 868.0
offset_bottom = 638.0
offset_left = 239.0
offset_top = 45.0
offset_right = 279.0
offset_bottom = 85.0
[node name="Control3" type="Control" parent="GameRoot/PossiblePositions" index="2"]
anchors_preset = 0
offset_left = 1096.0
offset_top = 598.0
offset_right = 1136.0
offset_bottom = 638.0
[node name="Control4" type="Control" parent="GameRoot/PossiblePositions" index="3"]
anchors_preset = 0
offset_left = 1515.0
offset_top = 431.0
offset_right = 1604.0
offset_bottom = 452.0
[node name="Control5" type="Control" parent="GameRoot/PossiblePositions" index="4"]
anchors_preset = 0
offset_left = 1829.0
offset_top = 431.0
offset_right = 1869.0
offset_bottom = 471.0
[node name="Control6" type="Control" parent="GameRoot/PossiblePositions" index="5"]
anchors_preset = 0
offset_left = 2106.0
offset_top = 431.0
offset_right = 2146.0
offset_bottom = 431.0
[node name="Control7" type="Control" parent="GameRoot/PossiblePositions" index="6"]
anchors_preset = 0
offset_left = 1429.0
offset_top = 818.0
offset_right = 1469.0
offset_bottom = 858.0
[node name="Control8" type="Control" parent="GameRoot/PossiblePositions" index="7"]
anchors_preset = 0
offset_left = 1719.0
offset_top = 818.0
offset_right = 1759.0
offset_bottom = 858.0
[node name="Control9" type="Control" parent="GameRoot/PossiblePositions" index="8"]
anchors_preset = 0
offset_left = 1988.0
offset_top = 818.0
offset_right = 2028.0
offset_bottom = 858.0
[node name="Control10" type="Control" parent="GameRoot/PossiblePositions" index="9"]
anchors_preset = 0
offset_left = 2201.0
offset_top = 818.0
offset_right = 2241.0
offset_bottom = 858.0
[node name="Control11" type="Control" parent="GameRoot/PossiblePositions" index="10"]
anchors_preset = 0
offset_left = 661.0
offset_top = 1145.0
offset_right = 701.0
offset_bottom = 1185.0
[node name="Control12" type="Control" parent="GameRoot/PossiblePositions" index="11"]
anchors_preset = 0
offset_left = 1012.0
offset_top = 1145.0
offset_right = 1052.0
offset_bottom = 1185.0
[node name="Parakeets" type="Control" parent="GameRoot" index="9"]
[node name="Parakeets" type="Control" parent="GameRoot" index="2"]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="TreeNestFront" type="TextureRect" parent="GameRoot" index="10"]
layout_mode = 0
offset_left = 1557.0
offset_top = 1405.0
offset_right = 1847.0
offset_bottom = 1512.0
texture = ExtResource("7_3mibn")
[node name="Position1" type="Control" parent="GameRoot/TreeNestFront" index="0"]
anchors_preset = 0
offset_left = 109.0
offset_top = 42.0
offset_right = 149.0
offset_bottom = 82.0
[node name="Position2" type="Control" parent="GameRoot/TreeNestFront" index="1"]
anchors_preset = 0
offset_left = 186.0
offset_top = 43.0
offset_right = 226.0
offset_bottom = 83.0
[node name="FlyAway" type="Control" parent="GameRoot" index="11"]
anchors_preset = 0
offset_left = 2832.0
offset_top = 1157.0
offset_right = 2872.0
offset_bottom = 1197.0
[node name="Position1" type="Control" parent="GameRoot/FlyAway" index="0"]
layout_mode = 3
anchors_preset = 0
offset_left = 109.0
offset_top = 42.0
offset_right = 149.0
offset_bottom = 82.0
[node name="Position2" type="Control" parent="GameRoot/FlyAway" index="1"]
layout_mode = 3
anchors_preset = 0
offset_left = 186.0
offset_top = 43.0
offset_right = 226.0
offset_bottom = 83.0
[node name="FlyFrom" type="Control" parent="GameRoot" index="12"]
[node name="FlyFrom" type="Control" parent="GameRoot" index="3"]
anchors_preset = 0
offset_left = 2832.0
offset_top = 1157.0
@@ -338,3 +304,26 @@ offset_left = -2744.0
offset_top = -1312.0
offset_right = -2704.0
offset_bottom = -1272.0
[node name="FlyAway" type="Control" parent="GameRoot" index="4"]
anchors_preset = 0
offset_left = 3046.0
offset_top = 1048.0
offset_right = 3086.0
offset_bottom = 1088.0
[node name="Position1" type="Control" parent="GameRoot/FlyAway" index="0"]
layout_mode = 3
anchors_preset = 0
offset_left = 109.0
offset_top = 45.0
offset_right = 149.0
offset_bottom = 85.0
[node name="Position2" type="Control" parent="GameRoot/FlyAway" index="1"]
layout_mode = 3
anchors_preset = 0
offset_left = 239.0
offset_top = 45.0
offset_right = 279.0
offset_bottom = 85.0