mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
more sfx
This commit is contained in:
parent
e08c2c3ef2
commit
7b67b3aef6
24 changed files with 238 additions and 167 deletions
|
|
@ -1,16 +1,37 @@
|
|||
extends StaticBody2D
|
||||
|
||||
func _ready() -> void:
|
||||
if GameStats.powerup_active:
|
||||
queue_free()
|
||||
else: GameStats.powerup_active = true
|
||||
position = Vector2(0, 184)
|
||||
|
||||
# spawn all the springs with some delays
|
||||
var counter = 0
|
||||
for child in get_children():
|
||||
if child.has_method("animate_spawn"):
|
||||
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"):
|
||||
child.animate()
|
||||
if child.has_method("animate_hit"):
|
||||
child.animate_hit()
|
||||
$DeathTimer.start()
|
||||
|
||||
var SFX = preload("res://Pegs/Yellow/Powerups/Spring/SpringSFX.tscn")
|
||||
var main = get_tree().current_scene
|
||||
var sfx = SFX.instance()
|
||||
main.add_child(sfx)
|
||||
sfx.play(0.0)
|
||||
|
||||
if GameStats.camera_fx:
|
||||
Engine.time_scale = 0.25
|
||||
|
||||
func spring():
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue