From 02027a8470a4b88b7c5f1d852248b071749c036f Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Tue, 3 Aug 2021 00:07:28 +0530 Subject: [PATCH] fixes --- src/layers/Background.tscn | 55 +++++++++++++++++++++++--------------- src/layers/PauseMenu.gd | 3 +++ src/levels/Level1.tscn | 2 +- src/scenes/GameOver.tscn | 4 +-- src/scenes/GameOver_Won.gd | 3 +++ src/scenes/GameWon.tscn | 4 +-- src/scenes/MainMenu.gd | 4 +++ src/scenes/MainMenu.tscn | 2 +- 8 files changed, 49 insertions(+), 28 deletions(-) diff --git a/src/layers/Background.tscn b/src/layers/Background.tscn index ada70cc..29c2bb5 100644 --- a/src/layers/Background.tscn +++ b/src/layers/Background.tscn @@ -32,6 +32,17 @@ __meta__ = { "_edit_horizontal_guides_": [ ] } +[node name="background_fill" type="ParallaxLayer" parent="."] +motion_mirroring = Vector2( 1024, 600 ) + +[node name="ColorRect" type="ColorRect" parent="background_fill"] +margin_right = 1024.0 +margin_bottom = 600.0 +color = Color( 0.47451, 0.690196, 0.870588, 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + [node name="Sky" type="ParallaxLayer" parent="."] motion_mirroring = Vector2( 1024, 0 ) @@ -43,42 +54,42 @@ centered = false [node name="Cloud1" type="ParallaxLayer" parent="."] motion_scale = Vector2( 0.25, 1 ) -motion_mirroring = Vector2( 1024, 0 ) +motion_mirroring = Vector2( 1024, 600 ) [node name="Cloud 1" type="Sprite" parent="Cloud1"] position = Vector2( 102, 306 ) texture = ExtResource( 5 ) [node name="Cloud 2" type="Sprite" parent="Cloud1"] -position = Vector2( 502, 430 ) +position = Vector2( 478, 523.177 ) texture = ExtResource( 4 ) [node name="Cloud 3" type="Sprite" parent="Cloud1"] -position = Vector2( 709, 388 ) +position = Vector2( 747.5, 350.5 ) texture = ExtResource( 6 ) [node name="Cloud 4" type="Sprite" parent="Cloud1"] -position = Vector2( 944, 188 ) +position = Vector2( 904.318, 85.5 ) texture = ExtResource( 2 ) [node name="Cloud 5" type="Sprite" parent="Cloud1"] -position = Vector2( 525, 282 ) +position = Vector2( 609, 402 ) texture = ExtResource( 3 ) [node name="Cloud2" type="ParallaxLayer" parent="."] motion_scale = Vector2( 0.2, 1 ) -motion_mirroring = Vector2( 1024, 0 ) +motion_mirroring = Vector2( 1024, 600 ) [node name="Cloud 6" type="Sprite" parent="Cloud2"] -position = Vector2( 936, 338 ) +position = Vector2( 930.318, 382 ) texture = ExtResource( 8 ) [node name="Cloud 7" type="Sprite" parent="Cloud2"] -position = Vector2( 231, 82 ) +position = Vector2( 310.755, 88.2996 ) texture = ExtResource( 11 ) [node name="Cloud 8" type="Sprite" parent="Cloud2"] -position = Vector2( 944, 70 ) +position = Vector2( 771.355, 54.4821 ) texture = ExtResource( 7 ) [node name="Cloud 9" type="Sprite" parent="Cloud2"] @@ -86,55 +97,55 @@ position = Vector2( 115, 160 ) texture = ExtResource( 10 ) [node name="Cloud 10" type="Sprite" parent="Cloud2"] -position = Vector2( 565, 68 ) +position = Vector2( 774.147, 258.603 ) texture = ExtResource( 9 ) [node name="Cloud3" type="ParallaxLayer" parent="."] motion_scale = Vector2( 0.15, 1 ) -motion_mirroring = Vector2( 1024, 0 ) +motion_mirroring = Vector2( 1024, 600 ) [node name="Cloud 11" type="Sprite" parent="Cloud3"] -position = Vector2( 571, 171 ) +position = Vector2( 652, 160.542 ) texture = ExtResource( 15 ) [node name="Cloud 12" type="Sprite" parent="Cloud3"] -position = Vector2( 728, 111 ) +position = Vector2( 546.5, 256.083 ) texture = ExtResource( 16 ) [node name="Cloud 13" type="Sprite" parent="Cloud3"] -position = Vector2( 411, 79 ) +position = Vector2( 470.5, 44.9821 ) texture = ExtResource( 13 ) [node name="Cloud 14" type="Sprite" parent="Cloud3"] -position = Vector2( 483, 204 ) +position = Vector2( 238.388, 483.575 ) texture = ExtResource( 14 ) [node name="Cloud 15" type="Sprite" parent="Cloud3"] -position = Vector2( 844, 451 ) +position = Vector2( 881.318, 447.575 ) texture = ExtResource( 12 ) [node name="Cloud4" type="ParallaxLayer" parent="."] motion_scale = Vector2( 0.1, 1 ) -motion_mirroring = Vector2( 1024, 0 ) +motion_mirroring = Vector2( 1024, 600 ) [node name="Cloud 16" type="Sprite" parent="Cloud4"] -position = Vector2( 717, 224 ) +position = Vector2( 900.194, 198.5 ) texture = ExtResource( 21 ) [node name="Cloud 17" type="Sprite" parent="Cloud4"] -position = Vector2( 208, 402 ) +position = Vector2( 329.166, 337 ) texture = ExtResource( 18 ) [node name="Cloud 18" type="Sprite" parent="Cloud4"] -position = Vector2( 328, 297 ) +position = Vector2( 393.666, 182.5 ) texture = ExtResource( 20 ) [node name="Cloud 19" type="Sprite" parent="Cloud4"] -position = Vector2( 300, 189 ) +position = Vector2( 53, 471.575 ) texture = ExtResource( 17 ) [node name="Cloud 20" type="Sprite" parent="Cloud4"] -position = Vector2( 769, 287 ) +position = Vector2( 721, 513.177 ) texture = ExtResource( 19 ) [node name="Hills2" type="ParallaxLayer" parent="."] diff --git a/src/layers/PauseMenu.gd b/src/layers/PauseMenu.gd index bdcd438..66f47e7 100644 --- a/src/layers/PauseMenu.gd +++ b/src/layers/PauseMenu.gd @@ -1,5 +1,7 @@ extends Control +onready var resume_button = $ResumeButton + func _ready() -> void: hide() @@ -10,6 +12,7 @@ func _input(event): func open(): show() get_tree().paused = true + resume_button.grab_focus() func close(): hide() diff --git a/src/levels/Level1.tscn b/src/levels/Level1.tscn index 51dbbd1..456a899 100644 --- a/src/levels/Level1.tscn +++ b/src/levels/Level1.tscn @@ -1176,7 +1176,7 @@ tile_set = SubResource( 49 ) cell_size = Vector2( 32, 32 ) cell_quadrant_size = 32 cell_custom_transform = Transform2D( 32, 0, 0, 32, 0, 0 ) -collision_bounce = 0.3 +collision_bounce = 0.5 collision_layer = 28 format = 1 tile_data = PoolIntArray( -1179482, 29, 0, -1113946, 30, 0, -1048410, 30, 0, -917511, 17, 0, -917510, 18, 0, -917509, 18, 0, -917508, 18, 0, -917507, 18, 0, -917506, 18, 0, -917505, 19, 0, -982931, 6, 0, -982930, 8, 0, -982874, 30, 0, -851975, 20, 0, -851974, 21, 0, -851973, 21, 0, -851972, 21, 0, -851971, 21, 0, -851970, 21, 0, -851969, 22, 0, -917338, 30, 0, -786439, 20, 0, -786438, 21, 0, -786437, 21, 0, -786436, 21, 0, -786435, 21, 0, -786434, 21, 0, -786433, 22, 0, -851843, 6, 0, -851842, 8, 0, -851802, 30, 0, -720903, 20, 0, -720902, 21, 0, -720901, 21, 0, -720900, 21, 0, -720899, 21, 0, -720898, 21, 0, -720897, 22, 0, -786273, 29, 0, -786266, 30, 0, -786235, 6, 0, -786234, 7, 0, -786233, 7, 0, -786232, 7, 0, -786231, 7, 0, -786230, 7, 0, -786229, 7, 0, -786228, 7, 0, -786227, 8, 0, -655367, 20, 0, -655366, 21, 0, -655365, 21, 0, -655364, 21, 0, -655363, 21, 0, -655362, 21, 0, -655361, 22, 0, -720737, 30, 0, -720730, 30, 0, -589831, 20, 0, -589830, 21, 0, -589829, 21, 0, -589828, 21, 0, -589827, 21, 0, -589826, 21, 0, -589825, 22, 0, -655251, 17, 0, -655250, 19, 0, -655201, 30, 0, -655194, 30, 0, -524295, 20, 0, -524294, 21, 0, -524293, 21, 0, -524292, 21, 0, -524291, 21, 0, -524290, 21, 0, -524289, 22, 0, -589726, 6, 0, -589725, 4, 0, -589724, 7, 0, -589723, 4, 0, -589722, 8, 0, -589715, 20, 0, -589714, 22, 0, -589700, 3, 0, -589699, 4, 0, -589698, 4, 0, -589697, 5, 0, -589665, 30, 0, -589658, 30, 0, -458759, 20, 0, -458758, 21, 0, -458757, 21, 0, -458756, 21, 0, -458755, 21, 0, -458754, 21, 0, -458753, 22, 0, -524191, 7, 0, -524185, 7, 0, -524179, 20, 0, -524178, 22, 0, -524149, 6, 0, -524148, 7, 0, -524147, 7, 0, -524146, 7, 0, -524145, 8, 0, -524132, 3, 0, -524131, 5, 0, -524129, 30, 0, -524128, 26, 0, -524127, 27, 0, -524126, 27, 0, -524125, 28, 0, -524122, 30, 0, -524104, 9, 0, -524103, 10, 0, -524091, 6, 0, -524090, 7, 0, -524089, 7, 0, -524088, 7, 0, -524087, 7, 0, -524086, 7, 0, -524085, 7, 0, -524084, 7, 0, -524083, 8, 0, -393223, 20, 0, -393222, 21, 0, -393221, 21, 0, -393220, 21, 0, -393219, 21, 0, -393218, 21, 0, -393217, 22, 0, -458705, 3, 0, -458704, 7, 0, -458703, 8, 0, -458655, 4, 0, -458649, 4, 0, -458643, 20, 0, -458642, 22, 0, -458593, 30, 0, -458586, 30, 0, -458568, 11, 0, -458567, 12, 0, -458547, 3, 0, -458546, 5, 0, -327687, 20, 0, -327686, 21, 0, -327685, 21, 0, -327684, 21, 0, -327683, 21, 0, -327682, 21, 0, -327681, 22, 0, -393151, 0, 0, -393150, 1, 0, -393149, 1, 0, -393148, 2, 0, -393129, 6, 0, -393128, 8, 0, -393119, 4, 0, -393113, 4, 0, -393107, 20, 0, -393106, 22, 0, -393085, 33, 0, -393084, 39, 0, -393057, 30, 0, -393050, 30, 0, -393032, 1, 0, -393031, 1, 0, -262151, 20, 0, -262150, 21, 0, -262149, 21, 0, -262148, 21, 0, -262147, 21, 0, -262146, 21, 0, -262145, 22, 0, -327628, 32, 0, -327583, 3, 0, -327582, 4, 0, -327581, 4, 0, -327580, 4, 0, -327579, 7, 0, -327578, 7, 0, -327577, 5, 0, -327571, 20, 0, -327570, 22, 0, -327549, 35, 0, -327548, 41, 0, -327521, 30, 0, -327520, 26, 0, -327519, 27, 0, -327518, 28, 0, -327514, 31, 0, -327506, 26, 0, -327505, 27, 0, -327504, 27, 0, -327503, 27, 0, -327502, 27, 0, -327501, 27, 0, -327500, 28, 0, -327496, 1, 0, -327495, 1, 0, -327490, 1, 0, -196615, 20, 0, -196614, 21, 0, -196613, 21, 0, -196612, 21, 0, -196611, 21, 0, -196610, 21, 0, -196609, 22, 0, -262121, 3, 0, -262120, 1, 0, -262119, 7, 0, -262118, 4, 0, -262117, 4, 0, -262116, 5, 0, -262091, 32, 0, -262050, 16, 0, -262038, 16, 0, -262035, 23, 0, -262034, 25, 0, -262022, 42, 0, -262021, 43, 0, -262020, 43, 0, -262019, 43, 0, -262018, 43, 0, -262017, 43, 0, -262016, 43, 0, -262015, 44, 0, -262006, 32, 0, -262004, 32, 0, -262002, 32, 0, -262000, 32, 0, -261988, 9, 0, -261987, 10, 0, -261985, 30, 0, -261978, 7, 0, -261960, 1, 0, -261959, 1, 0, -131079, 20, 0, -131078, 21, 0, -131077, 21, 0, -131076, 21, 0, -131075, 21, 0, -131074, 21, 0, -131073, 22, 0, -196564, 16, 0, -196562, 26, 0, -196561, 27, 0, -196560, 27, 0, -196559, 27, 0, -196558, 28, 0, -196554, 32, 0, -196514, 1, 0, -196502, 1, 0, -196488, 32, 0, -196452, 11, 0, -196451, 12, 0, -196449, 30, 0, -196436, 32, 0, -196424, 1, 0, -196423, 1, 0, -196412, 17, 0, -196411, 18, 0, -196410, 18, 0, -196409, 18, 0, -196408, 18, 0, -196407, 18, 0, -196406, 18, 0, -196405, 18, 0, -196404, 18, 0, -196403, 18, 0, -196402, 18, 0, -196401, 19, 0, -196394, 9, 0, -196393, 10, 0, -65543, 20, 0, -65542, 21, 0, -65541, 21, 0, -65540, 21, 0, -65539, 21, 0, -65538, 21, 0, -65537, 22, 0, -131041, 9, 0, -131040, 10, 0, -131030, 16, 0, -131017, 32, 0, -131009, 26, 0, -131008, 27, 0, -131007, 27, 0, -131006, 27, 0, -131005, 27, 0, -131004, 28, 0, -130995, 29, 0, -130986, 0, 0, -130985, 1, 0, -130984, 27, 0, -130983, 27, 0, -130982, 28, 0, -130978, 1, 0, -130966, 1, 0, -130954, 32, 0, -130921, 42, 0, -130920, 43, 0, -130919, 43, 0, -130918, 43, 0, -130917, 43, 0, -130916, 43, 0, -130915, 43, 0, -130914, 44, 0, -130913, 30, 0, -130910, 26, 0, -130909, 28, 0, -130902, 16, 0, -130888, 1, 0, -130887, 1, 0, -130876, 20, 0, -130875, 21, 0, -130874, 21, 0, -130873, 21, 0, -130872, 21, 0, -130871, 21, 0, -130870, 21, 0, -130869, 21, 0, -130868, 21, 0, -130867, 21, 0, -130866, 21, 0, -130865, 22, 0, -130858, 11, 0, -130857, 12, 0, -7, 20, 0, -6, 21, 0, -5, 21, 0, -4, 21, 0, -3, 21, 0, -2, 21, 0, -1, 22, 0, -65505, 11, 0, -65504, 12, 0, -65464, 13, 0, -65459, 30, 0, -65457, 32, 0, -65441, 17, 0, -65440, 18, 0, -65439, 18, 0, -65438, 18, 0, -65437, 18, 0, -65436, 18, 0, -65435, 18, 0, -65434, 18, 0, -65433, 18, 0, -65432, 18, 0, -65431, 19, 0, -65427, 9, 0, -65426, 10, 0, -65425, 0, 0, -65424, 1, 0, -65423, 1, 0, -65422, 1, 0, -65421, 1, 0, -65420, 2, 0, -65377, 30, 0, -65370, 26, 0, -65369, 27, 0, -65368, 28, 0, -65352, 1, 0, -65351, 1, 0, -65340, 20, 0, -65339, 21, 0, -65338, 21, 0, -65337, 21, 0, -65336, 21, 0, -65335, 21, 0, -65334, 21, 0, -65333, 21, 0, -65332, 21, 0, -65331, 21, 0, -65330, 21, 0, -65329, 22, 0, -65322, 1, 0, -65321, 1, 0, 65529, 21, 0, 65530, 21, 0, 65531, 21, 0, 65532, 21, 0, 65533, 21, 0, 65534, 21, 0, 65535, 21, 0, 0, 18, 0, 1, 18, 0, 2, 18, 0, 3, 18, 0, 4, 18, 0, 5, 18, 0, 6, 18, 0, 7, 18, 0, 8, 18, 0, 9, 18, 0, 10, 18, 0, 11, 18, 0, 12, 19, 0, 17, 17, 0, 18, 18, 0, 19, 18, 0, 20, 18, 0, 21, 18, 0, 22, 18, 0, 23, 18, 0, 24, 18, 0, 25, 18, 0, 26, 18, 0, 27, 18, 0, 28, 18, 0, 29, 18, 0, 30, 18, 0, 31, 18, 0, 32, 18, 0, 33, 18, 0, 34, 19, 0, 36, 13, 0, 38, 13, 0, 40, 13, 0, 58, 33, 0, 59, 36, 0, 60, 36, 0, 61, 39, 0, 72, 14, 0, 77, 30, 0, 95, 20, 0, 96, 21, 0, 97, 21, 0, 98, 21, 0, 99, 21, 0, 100, 21, 0, 101, 21, 0, 102, 21, 0, 103, 21, 0, 104, 21, 0, 105, 22, 0, 109, 11, 0, 110, 12, 0, 111, 6, 0, 112, 7, 0, 113, 7, 0, 114, 7, 0, 115, 8, 0, 159, 30, 0, 184, 1, 0, 185, 1, 0, 196, 20, 0, 197, 21, 0, 198, 21, 0, 199, 21, 0, 200, 21, 0, 201, 21, 0, 202, 21, 0, 203, 21, 0, 204, 21, 0, 205, 21, 0, 206, 21, 0, 207, 22, 0, 214, 1, 0, 215, 1, 0, 131065, 21, 0, 131066, 21, 0, 131067, 21, 0, 131068, 21, 0, 131069, 21, 0, 131070, 21, 0, 131071, 21, 0, 65536, 21, 0, 65537, 21, 0, 65538, 21, 0, 65539, 21, 0, 65540, 21, 0, 65541, 21, 0, 65542, 21, 0, 65543, 21, 0, 65544, 21, 0, 65545, 21, 0, 65546, 21, 0, 65547, 21, 0, 65548, 22, 0, 65553, 20, 0, 65554, 21, 0, 65555, 21, 0, 65556, 21, 0, 65557, 21, 0, 65558, 21, 0, 65559, 21, 0, 65560, 21, 0, 65561, 21, 0, 65562, 21, 0, 65563, 21, 0, 65564, 21, 0, 65565, 21, 0, 65566, 21, 0, 65567, 21, 0, 65568, 21, 0, 65569, 21, 0, 65570, 22, 0, 65572, 14, 0, 65574, 14, 0, 65576, 14, 0, 65594, 34, 0, 65595, 37, 0, 65596, 37, 0, 65597, 40, 0, 65608, 14, 0, 65613, 30, 0, 65631, 20, 0, 65632, 21, 0, 65633, 21, 0, 65634, 21, 0, 65635, 21, 0, 65636, 21, 0, 65637, 21, 0, 65638, 21, 0, 65639, 21, 0, 65640, 21, 0, 65641, 22, 0, 65645, 1, 0, 65655, 0, 0, 65656, 2, 0, 65695, 30, 0, 65720, 1, 0, 65721, 1, 0, 65732, 20, 0, 65733, 21, 0, 65734, 21, 0, 65735, 21, 0, 65736, 21, 0, 65737, 21, 0, 65738, 21, 0, 65739, 21, 0, 65740, 21, 0, 65741, 21, 0, 65742, 21, 0, 65743, 22, 0, 65750, 1, 0, 65751, 1, 0, 196601, 21, 0, 196602, 21, 0, 196603, 21, 0, 196604, 21, 0, 196605, 21, 0, 196606, 21, 0, 196607, 21, 0, 131072, 21, 0, 131073, 21, 0, 131074, 21, 0, 131075, 21, 0, 131076, 21, 0, 131077, 21, 0, 131078, 21, 0, 131079, 21, 0, 131080, 21, 0, 131081, 21, 0, 131082, 21, 0, 131083, 21, 0, 131084, 22, 0, 131089, 20, 0, 131090, 21, 0, 131091, 21, 0, 131092, 21, 0, 131093, 21, 0, 131094, 21, 0, 131095, 21, 0, 131096, 21, 0, 131097, 21, 0, 131098, 21, 0, 131099, 21, 0, 131100, 21, 0, 131101, 21, 0, 131102, 21, 0, 131103, 21, 0, 131104, 21, 0, 131105, 21, 0, 131106, 22, 0, 131108, 14, 0, 131110, 14, 0, 131112, 14, 0, 131130, 34, 0, 131131, 37, 0, 131132, 37, 0, 131133, 40, 0, 131144, 14, 0, 131149, 30, 0, 131167, 20, 0, 131168, 21, 0, 131169, 21, 0, 131170, 21, 0, 131171, 21, 0, 131172, 21, 0, 131173, 21, 0, 131174, 21, 0, 131175, 21, 0, 131176, 21, 0, 131177, 22, 0, 131181, 1, 0, 131231, 30, 0, 131256, 1, 0, 131257, 1, 0, 131268, 20, 0, 131269, 21, 0, 131270, 21, 0, 131271, 21, 0, 131272, 21, 0, 131273, 21, 0, 131274, 21, 0, 131275, 21, 0, 131276, 21, 0, 131277, 21, 0, 131278, 21, 0, 131279, 22, 0, 131286, 1, 0, 131287, 1, 0, 262137, 21, 0, 262138, 21, 0, 262139, 21, 0, 262140, 21, 0, 262141, 21, 0, 262142, 21, 0, 262143, 21, 0, 196608, 21, 0, 196609, 21, 0, 196610, 21, 0, 196611, 21, 0, 196612, 21, 0, 196613, 21, 0, 196614, 21, 0, 196615, 21, 0, 196616, 21, 0, 196617, 21, 0, 196618, 21, 0, 196619, 21, 0, 196620, 22, 0, 196625, 20, 0, 196626, 21, 0, 196627, 21, 0, 196628, 21, 0, 196629, 21, 0, 196630, 21, 0, 196631, 21, 0, 196632, 21, 0, 196633, 21, 0, 196634, 21, 0, 196635, 21, 0, 196636, 21, 0, 196637, 21, 0, 196638, 21, 0, 196639, 21, 0, 196640, 21, 0, 196641, 21, 0, 196642, 22, 0, 196644, 15, 0, 196646, 15, 0, 196648, 15, 0, 196666, 34, 0, 196667, 37, 0, 196668, 37, 0, 196669, 40, 0, 196680, 14, 0, 196685, 30, 0, 196703, 20, 0, 196704, 21, 0, 196705, 21, 0, 196706, 21, 0, 196707, 21, 0, 196708, 21, 0, 196709, 21, 0, 196710, 21, 0, 196711, 21, 0, 196712, 21, 0, 196713, 22, 0, 196717, 17, 0, 196718, 18, 0, 196719, 18, 0, 196720, 18, 0, 196721, 18, 0, 196722, 18, 0, 196723, 18, 0, 196724, 19, 0, 196767, 30, 0, 196792, 1, 0, 196793, 1, 0, 196804, 20, 0, 196805, 21, 0, 196806, 21, 0, 196807, 21, 0, 196808, 21, 0, 196809, 21, 0, 196810, 21, 0, 196811, 21, 0, 196812, 21, 0, 196813, 21, 0, 196814, 21, 0, 196815, 22, 0, 196822, 1, 0, 196823, 1, 0 ) diff --git a/src/scenes/GameOver.tscn b/src/scenes/GameOver.tscn index 940f859..fdab80f 100644 --- a/src/scenes/GameOver.tscn +++ b/src/scenes/GameOver.tscn @@ -75,7 +75,7 @@ animations = [ { "speed": 10.0 } ] -[node name="MainMenu" type="Control"] +[node name="GameOver" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 3 ) @@ -139,7 +139,7 @@ __meta__ = { position = Vector2( 243, 313 ) frames = SubResource( 12 ) animation = "New Anim" -frame = 2 +frame = 6 playing = true [node name="ColorRect" type="ColorRect" parent="CanvasLayer/Control"] diff --git a/src/scenes/GameOver_Won.gd b/src/scenes/GameOver_Won.gd index 8ea13e9..a8d0ed9 100644 --- a/src/scenes/GameOver_Won.gd +++ b/src/scenes/GameOver_Won.gd @@ -5,9 +5,12 @@ onready var camera = $Camera2D onready var score = $CanvasLayer/Control/ColorRect2/Score onready var coins = $CanvasLayer/Control/ColorRect3/Coins +onready var play_button = $CanvasLayer/Control/PlayButton + func _ready() -> void: score.text = str(Global.score) coins.text = str(Global.coins) + play_button.grab_focus() func _physics_process(delta: float) -> void: $Camera2D.offset_h += 2 * delta diff --git a/src/scenes/GameWon.tscn b/src/scenes/GameWon.tscn index 5a6cb47..6287a91 100644 --- a/src/scenes/GameWon.tscn +++ b/src/scenes/GameWon.tscn @@ -75,7 +75,7 @@ animations = [ { "speed": 10.0 } ] -[node name="MainMenu" type="Control"] +[node name="GameWon" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 3 ) @@ -139,7 +139,7 @@ __meta__ = { position = Vector2( 243, 307 ) frames = SubResource( 12 ) animation = "New Anim" -frame = 8 +frame = 1 playing = true [node name="ColorRect" type="ColorRect" parent="CanvasLayer/Control"] diff --git a/src/scenes/MainMenu.gd b/src/scenes/MainMenu.gd index 054ade3..352d9fe 100644 --- a/src/scenes/MainMenu.gd +++ b/src/scenes/MainMenu.gd @@ -2,6 +2,10 @@ extends Control class_name MainMenu onready var camera = $Camera2D +onready var play_button = $CanvasLayer/Control/PlayButton + +func _ready() -> void: + play_button.grab_focus() func _physics_process(delta: float) -> void: camera.offset_h += 1.5 * delta diff --git a/src/scenes/MainMenu.tscn b/src/scenes/MainMenu.tscn index 46a8ac1..a566075 100644 --- a/src/scenes/MainMenu.tscn +++ b/src/scenes/MainMenu.tscn @@ -123,7 +123,7 @@ __meta__ = { position = Vector2( 521, 219 ) frames = SubResource( 12 ) animation = "New Anim" -frame = 6 +frame = 4 playing = true [node name="ColorRect" type="ColorRect" parent="CanvasLayer/Control"]