This commit is contained in:
zoe 2021-10-18 11:27:04 +02:00
parent e08c2c3ef2
commit 7b67b3aef6
24 changed files with 238 additions and 167 deletions

View file

@ -23,6 +23,15 @@ func make_green():
powerup.global_position = global_position
# has to run before adding powerup as child
# because adding the powerup changes powerup_active to true
if !GameStats.powerup_active:
var SFX = preload("res://Pegs/Yellow/Powerups/PowerupSFX.tscn")
var sfx = SFX.instance()
main.add_child(sfx)
sfx.global_position = global_position
sfx.play(0)
main.add_child(powerup)
#finally delete the old peg