From a88727b2d830ff4d35dcaf85320729846d1efe26 Mon Sep 17 00:00:00 2001 From: zoe Date: Mon, 18 Oct 2021 13:25:09 +0200 Subject: [PATCH] added cool animation to springs --- ...m.png-f61a8e364dfcd48f694cac6077108a99.md5 | 3 + ....png-f61a8e364dfcd48f694cac6077108a99.stex | Bin 0 -> 1364 bytes Aseprite/springSpawn.ase | Bin 0 -> 1836 bytes Menu/WinScreenScoreLabel.gd | 2 +- Pegs/Yellow/PowerupCards/Spring.tscn | 17 ++- .../Powerups/Scattershot/Scattershot.tscn | 84 +++++++-------- Pegs/Yellow/Powerups/Spawn/FromBottom.gd | 19 ++++ Pegs/Yellow/Powerups/Spawn/FromBottom.tscn | 35 +++++++ .../Yellow/Powerups/Spawn/FromBottomSprite.gd | 11 ++ .../Powerups/Spawn/FromBottomSprite.tscn | 98 ++++++++++++++++++ Pegs/Yellow/Powerups/Spawn/fromBottom.png | Bin 0 -> 1229 bytes .../Powerups/Spawn/fromBottom.png.import | 34 ++++++ Pegs/Yellow/Powerups/Spring/Springs.gd | 11 +- 13 files changed, 267 insertions(+), 47 deletions(-) create mode 100644 .import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.md5 create mode 100644 .import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.stex create mode 100644 Aseprite/springSpawn.ase create mode 100644 Pegs/Yellow/Powerups/Spawn/FromBottom.gd create mode 100644 Pegs/Yellow/Powerups/Spawn/FromBottom.tscn create mode 100644 Pegs/Yellow/Powerups/Spawn/FromBottomSprite.gd create mode 100644 Pegs/Yellow/Powerups/Spawn/FromBottomSprite.tscn create mode 100644 Pegs/Yellow/Powerups/Spawn/fromBottom.png create mode 100644 Pegs/Yellow/Powerups/Spawn/fromBottom.png.import diff --git a/.import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.md5 b/.import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.md5 new file mode 100644 index 0000000..6f1a50b --- /dev/null +++ b/.import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.md5 @@ -0,0 +1,3 @@ +source_md5="c7074158bb40576d10c37526ac6a0131" +dest_md5="39e883669776a9934ad90f82bc8ca7ff" + diff --git a/.import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.stex b/.import/fromBottom.png-f61a8e364dfcd48f694cac6077108a99.stex new file mode 100644 index 0000000000000000000000000000000000000000..6209bf2f4d1800bcfdd79309fee5c0ee5a01b4fc GIT binary patch literal 1364 zcmV-a1*`f;L{n7Y0000$000020000001yTN0000u1pok0PDdb#P)Px(?ny*JRCt{2oy~FGIt+#7 zOgeCHNd@U3+pN4z2dTj6Ej2i+>yc%V0*Jpu>U=YACV7!4P~;&&5Y&Cz2)PkIzx}B; z;R9c*4It!ZyzT!&0g}7(c74hAzWOT%DPa1 zWC*J(=+WtWWoXKea%&|vFbH!qPJ%FWITJVw9=*IiQ-D=iqmiR$+|C4u7+LhN39(*B zD8OVgwgL9y6g-bJU?GfxE{M0tXP8N5g+Ul{Nw)Z+qLLn&E8h3e1x=% zL06j{v+Khdupa5Tw5YRkCbXS3di%jj_F%#putQSbWLE@+5qaOX477l9I{_jmBTK|K zD#+G8RP>0ynv3cUT~HwQ9ku0V^*VFUH9NacBaG4GITT+X&VcoVyNCN(h%*uvoB?%c zKKA4O5unlF!(MPG;#(=1+X4l6E{e!6XbqQHaq2q?X*&_e z&8ugYHsB1XKpGf1i#E=}Ot$uzL44ar0e;}B^NluYR%h@yAGb={nFkrRQGh$7zicBV zJL{uoKf)kz2J%dmVH?+g%o2g8Dv2P2bOC0chZ8*4JqS}>4vELBt(Fv^637$bh|KVw zS~f=7ZYi5Ag<`7t|vNGE$Fef-f_;eio4H7j4@VGoWCUI;M6(=46iEkJ>rCK(1f3ZBqzP z`4T>eE5gOFxPg-U(LvfgN3vyvC$FgF)psf*w*j;uyF9Ca@Qx8|xWY|<2FllBy@r~h z5x33nG<|h_tDm0@qzl?|E27*DZ3@?!9nr3khg<7)jl`bO`&Sp=vEGmZ+@Ib)`~NL6 z&W^S0i0(L9!jNLEZ{${o*ZmRw=~(ZlpWptBx`5U#jB?i#mAkoNE1_*W)eLx0yEg0} zak_j-GQ?LEJ)Avid4;y^R03=iek(B@JCNt+2{NggVUcF`>NeQ669FQAmtR{(=9iOu z(Nj%1Gmy2$_CR6>LK}P%V3biF<$C2ZM*Yx+)Q0RI39&x&foBx;!AQhATU?QYiX{kR zVun4bJHvOM!}|=FJ+gX?rYP=?6i<7j>wXvUW%QxmGs-rzxxVJy->iPW4?3=7Iyta|N zXu6;)e~IeORJChW-$C!Q%^9#F-w~DSQPP4WpEjdiN1jpb&TH%#wbdL2MWW)gL< zilA9KP~g!!x)87!#N@5h;Li(Ak~-{HArIZZlN9oNuEZ=mH|%A7+I8BrL`w~DxMICP zSgwlT03K|>02lym2oU6tknSn=$_j`fPWZ>|^cJ%-EF5wyYeJT>A{4O?7Z~$BuI=fW z)k?jyl9Je{#(GPwi#sYevy4Z;S5NJB>Vr5OtDzY($fxn2Tj`=?gaMdh7!jcRS+Zk? zy;|Wj_oER%W%ptv(;mPFttb+Zwk?|ZUWo!*3d}GlG@!Fk_lZTMwM?zGwa3AF*<;b= ztA9A1kvA=Gy#jD)>HMY@sV84pvioh8;mi`7OPBNY%bUYDx3>6$+r)1UlyZ|!$AcVC zPr@K%!8+IupFcI-0K<&{W5_+(*`xswl1dZ%(hhNJU=YC;@9-x>UD}X79{H-`THhF# z0^e?=Q&N6lm8B?wP!on2AVYY55QyhS0oo+zcty*d{54gsn`6A0rZb0+QJIANSbLsIRWJZ5Mil}Z4ORVCMh1wsb5mL7j`5U0 zhoKL|^=ZAqvwdlIeSP^dB zcDKD1lWvk*$|4OTHxBdA8ktX{+oJ_a5Pt>eyt@v>x z^ZG{mcu>+Xeog7}aKYsd-3Gqz`#Y!Riy!A0M5gYGyl;@m>!`TeYY~0P`32osD|0YM zh8&Rm?i|x5@#UYBur}o%ivpg=;Q(}aVEwU_!eD?S1v?
QiGuz{pfRY=OLHtXRv zhlz%=>N&f+UeE1%dFbQcQ|`!IS7f(MsS*c0Rm}xBmMG3ekIa0mq(TPU0F>@3DyWHORsiT$GovMOor=kW%CMA!g=Vdph z3%J$=I%x*aL)R!k?7@qISt#(|?c)~6wo}@7fcA-i!FJb(&=zgdu5O6iE}%}=T0i%$ zMEi)Yn^CyBfN1YLxJAb#I>)hX+=}A#cu}Bzf~Vw|ZsnK>2Y7Aywyu22FDv4K?!kiv zzwS*KiyD7xUNq{$&aFwdOYq&&9s4q)MziFui_gUwq5jkCZX2UyshsxYR)fpj@PlV$ zZ(fGay|&(MMLt%KN)<_YjXYPeMf4kn-{`#0e&(RjJ#}k#p5EJE%GA4dBv1YYblPHN literal 0 HcmV?d00001 diff --git a/Menu/WinScreenScoreLabel.gd b/Menu/WinScreenScoreLabel.gd index 2e7e591..0f5a7d2 100644 --- a/Menu/WinScreenScoreLabel.gd +++ b/Menu/WinScreenScoreLabel.gd @@ -1,7 +1,7 @@ extends Label func _ready(): - GameStats.connect("score_changed", self, "update_score_text") + var _connect = GameStats.connect("score_changed", self, "update_score_text") text = String(GameStats.score) func update_score_text(value): diff --git a/Pegs/Yellow/PowerupCards/Spring.tscn b/Pegs/Yellow/PowerupCards/Spring.tscn index 891dbd5..8e2297f 100644 --- a/Pegs/Yellow/PowerupCards/Spring.tscn +++ b/Pegs/Yellow/PowerupCards/Spring.tscn @@ -1,11 +1,24 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Pegs/Yellow/PowerupCard.tscn" type="PackedScene" id=1] [ext_resource path="res://Pegs/Yellow/Powerups/Spring/spring-Sheet.png" type="Texture" id=2] +[ext_resource path="res://Pegs/Yellow/Powerups/Spawn/fromBottom.png" type="Texture" id=3] [node name="Spring" instance=ExtResource( 1 )] powerup = "res://Pegs/Yellow/Powerups/Spring/Springs.tscn" -[node name="Sprite" parent="." index="0"] +[node name="Sprite2" type="Sprite" parent="." index="0"] +position = Vector2( 21, 27 ) +texture = ExtResource( 3 ) +hframes = 7 +frame = 1 + +[node name="Sprite4" type="Sprite" parent="." index="1"] +position = Vector2( 44, 27 ) +texture = ExtResource( 3 ) +hframes = 7 +frame = 1 + +[node name="Sprite" parent="." index="2"] texture = ExtResource( 2 ) hframes = 9 diff --git a/Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn b/Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn index ecd8f45..1bbfe3f 100644 --- a/Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn +++ b/Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn @@ -3,68 +3,68 @@ [ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/Scattershot.gd" type="Script" id=1] [ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/ScattershoPortalt.png" type="Texture" id=2] -[sub_resource type="AtlasTexture" id=8] +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 2 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 2 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 2 ) +region = Rect2( 64, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 2 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 2 ) +region = Rect2( 128, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=6] atlas = ExtResource( 2 ) region = Rect2( 160, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=7] +atlas = ExtResource( 2 ) +region = Rect2( 160, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 2 ) +region = Rect2( 128, 0, 32, 32 ) + [sub_resource type="AtlasTexture" id=9] atlas = ExtResource( 2 ) -region = Rect2( 128, 0, 32, 32 ) +region = Rect2( 96, 0, 32, 32 ) [sub_resource type="AtlasTexture" id=10] atlas = ExtResource( 2 ) -region = Rect2( 96, 0, 32, 32 ) +region = Rect2( 64, 0, 32, 32 ) [sub_resource type="AtlasTexture" id=11] atlas = ExtResource( 2 ) -region = Rect2( 64, 0, 32, 32 ) +region = Rect2( 32, 0, 32, 32 ) [sub_resource type="AtlasTexture" id=12] atlas = ExtResource( 2 ) -region = Rect2( 32, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=13] -atlas = ExtResource( 2 ) region = Rect2( 0, 0, 32, 32 ) -[sub_resource type="AtlasTexture" id=14] -atlas = ExtResource( 2 ) -region = Rect2( 0, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=15] -atlas = ExtResource( 2 ) -region = Rect2( 32, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=16] -atlas = ExtResource( 2 ) -region = Rect2( 64, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=17] -atlas = ExtResource( 2 ) -region = Rect2( 96, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=18] -atlas = ExtResource( 2 ) -region = Rect2( 128, 0, 32, 32 ) - -[sub_resource type="AtlasTexture" id=19] -atlas = ExtResource( 2 ) -region = Rect2( 160, 0, 32, 32 ) - -[sub_resource type="SpriteFrames" id=20] +[sub_resource type="SpriteFrames" id=13] animations = [ { -"frames": [ SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ) ], -"loop": true, -"name": "appear", -"speed": 15.0 -}, { -"frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ) ], +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], "loop": false, "name": "disappear", "speed": 15.0 +}, { +"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ], +"loop": true, +"name": "appear", +"speed": 15.0 } ] -[sub_resource type="ParticlesMaterial" id=21] +[sub_resource type="ParticlesMaterial" id=14] emission_shape = 1 emission_sphere_radius = 16.0 flag_disable_z = true @@ -86,7 +86,7 @@ autostart = true [node name="AnimatedSprite" type="AnimatedSprite" parent="."] z_index = -15 -frames = SubResource( 20 ) +frames = SubResource( 13 ) animation = "appear" [node name="Particles2D" type="Particles2D" parent="."] @@ -96,7 +96,7 @@ amount = 64 lifetime = 3.0 one_shot = true explosiveness = 1.0 -process_material = SubResource( 21 ) +process_material = SubResource( 14 ) [connection signal="timeout" from="SlowmoTimer" to="." method="set_time_scale"] [connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"] diff --git a/Pegs/Yellow/Powerups/Spawn/FromBottom.gd b/Pegs/Yellow/Powerups/Spawn/FromBottom.gd new file mode 100644 index 0000000..0379eb3 --- /dev/null +++ b/Pegs/Yellow/Powerups/Spawn/FromBottom.gd @@ -0,0 +1,19 @@ +extends Node2D + +func _ready() -> void: + global_position = Vector2(0, 184) + spawn_animations() + $Particles2D.emitting = true + +func spawn_animations(): + var Sprite = preload("res://Pegs/Yellow/Powerups/Spawn/FromBottomSprite.tscn") + var counter = 0 + while counter <= 12: + var sprite = Sprite.instance() + add_child(sprite) + sprite.play("spawn") + sprite.offset = Vector2(counter * 32, -32) + sprite.global_position = global_position + counter += 1 + + diff --git a/Pegs/Yellow/Powerups/Spawn/FromBottom.tscn b/Pegs/Yellow/Powerups/Spawn/FromBottom.tscn new file mode 100644 index 0000000..a73b7c1 --- /dev/null +++ b/Pegs/Yellow/Powerups/Spawn/FromBottom.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Pegs/Yellow/Powerups/Spawn/FromBottom.gd" type="Script" id=2] + +[sub_resource type="ParticlesMaterial" id=1] +emission_shape = 2 +emission_box_extents = Vector3( 192, 1, 1 ) +flag_disable_z = true +direction = Vector3( 0, -100, 0 ) +flatness = 1.0 +gravity = Vector3( 0, 98, 0 ) +initial_velocity = 224.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +color = Color( 0.454902, 0.337255, 0.607843, 1 ) + +[node name="FromBottom" type="Node2D"] +script = ExtResource( 2 ) + +[node name="Timer" type="Timer" parent="."] +wait_time = 10.0 +one_shot = true +autostart = true + +[node name="Particles2D" type="Particles2D" parent="."] +position = Vector2( 192, 0 ) +z_index = -20 +emitting = false +amount = 128 +lifetime = 2.0 +one_shot = true +explosiveness = 0.5 +process_material = SubResource( 1 ) + +[connection signal="timeout" from="Timer" to="." method="queue_free"] diff --git a/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.gd b/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.gd new file mode 100644 index 0000000..5162955 --- /dev/null +++ b/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.gd @@ -0,0 +1,11 @@ +extends AnimatedSprite + +var ready_for_delete = false + +func play_backwards(): + if ready_for_delete: + queue_free() + else: + play("despawn") + ready_for_delete = true + diff --git a/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.tscn b/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.tscn new file mode 100644 index 0000000..2d413c9 --- /dev/null +++ b/Pegs/Yellow/Powerups/Spawn/FromBottomSprite.tscn @@ -0,0 +1,98 @@ +[gd_scene load_steps=18 format=2] + +[ext_resource path="res://Pegs/Yellow/Powerups/Spawn/fromBottom.png" type="Texture" id=1] +[ext_resource path="res://Pegs/Yellow/Powerups/Spawn/FromBottomSprite.gd" type="Script" id=2] + +[sub_resource type="AtlasTexture" id=1] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=2] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 32, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=3] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 64, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=4] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 96, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=5] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 128, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=6] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 160, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=7] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 192, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=9] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 192, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=10] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 160, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=11] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 128, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=12] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 96, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=13] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 64, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=14] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 32, 0, 32, 64 ) + +[sub_resource type="AtlasTexture" id=15] +flags = 2 +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 32, 64 ) + +[sub_resource type="SpriteFrames" id=8] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ) ], +"loop": false, +"name": "spawn", +"speed": 15.0 +}, { +"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ) ], +"loop": false, +"name": "despawn", +"speed": 15.0 +} ] + +[node name="FromBottomSprite" type="AnimatedSprite"] +position = Vector2( 0, -32 ) +z_index = -200 +z_as_relative = false +frames = SubResource( 8 ) +animation = "despawn" +centered = false +script = ExtResource( 2 ) + +[connection signal="animation_finished" from="." to="." method="play_backwards"] diff --git a/Pegs/Yellow/Powerups/Spawn/fromBottom.png b/Pegs/Yellow/Powerups/Spawn/fromBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..d63bf99586396731faeab8bd4b22ab91f6498ec0 GIT binary patch literal 1229 zcmV;;1Ty=HP) z%~9Sk5Qa@A9nc$8KnGkoais$)fZnKqoIb`llC}T4lHX@0Ga<3%wWU{DtyW^&003#+ zWg7s%m3V%5|K9%$0fI|&6hw=+&nL1@DCO;e0Kui<3dWj0nGXkGC0;-7+1EjU01TiC z>*eu_eH{b{zyPYSj!=aAS5z_p!EokkoS=y(6ycUI6kM0=Acz&OANQh>5-unJ21wmh z2oQioAV9DL)JSDDAV5$8t$?I1U=NBt8k=wTA_xOg;Ra!(!H%jxfEVW|0Lu{mDiKak zAi#?Qk>r9oAP_NY(4$4>yFh?IgmxZg(df_0;FRw*r=-{b7xd!51&yH zpWb~D!4(8>&Vc|6u@_sf;hv3#XN|qL4n;+}J!chH(F?es$wat^dpCBa`O^wOfDAkW zCY&-?63?whaRO#i;Q~D>bSySnQ8mCGE_D2-_gQ9hAn$sg&p~HD~r$=mc6+ z9;qU1!yND;0hgKSZDy@3UMd&?4X|=mD!XHuXp;y$u&OHvaI14DY<8m>F+&H@v(egi zO4bqu2ypXl_|_F4v8PRv23Liijh?ns)+u{HfG1dphg$JgQA%z;sOCD(vpLsruG13n zoU`wl9)yYB4`=z@C{_tL^r-xP-nLC4K+Z>a`+U0d7FTrY6IhoiTu@G9J&Mo6#n8Bc zl>4hwDHv19770@bP(!P+dso`*0vlnSu%JP@Ke7tT3$O(zS969++%~%ah}HXg26DV@ zh@_+dqt-y%-C0&?)}WB3^XqkC41-n5FlL&efwWb@dN zeLO!Rm<6dk`c$y3f(=%oL%+_KJc zJf+dfGb%Pv%jZXC-$a#RwTxs%*9BeqB&sWuRj*k1Z_^zCE1pD^MRqT#fs#)fQLob9 zrI7Jli5*f~)ltw&WbBscQN=Brxzm)arCKLjkL=)F)8a>f5fx=U-{S6;;FPV!VhKeu zZ(X4yrC@RTnYPVad~5PD#L<^N^Q}34cXb~ftVOl void: if GameStats.powerup_active: queue_free() - else: GameStats.powerup_active = true + else: + GameStats.powerup_active = true + # spawn animation + var main = get_tree().current_scene + var Anim = preload("res://Pegs/Yellow/Powerups/Spawn/FromBottom.tscn") + var anim = Anim.instance() + main.add_child(anim) position = Vector2(0, 184) # spawn all the springs with some delays @@ -13,16 +19,17 @@ func _ready() -> void: counter += 1 child.animate_spawn(rand_range(1, counter)) + func explode(): queue_free() Engine.time_scale = 1 - GameStats.powerup_active = false func make_green(): for child in get_children(): if child.has_method("animate_hit"): child.animate_hit() $DeathTimer.start() + GameStats.powerup_active = false var SFX = preload("res://Pegs/Yellow/Powerups/Spring/SpringSFX.tscn") var main = get_tree().current_scene