Started boss wave and iniital assets; broke out parallax speed change
functionality.
This commit is contained in:
parent
4f0eff986f
commit
59d42fb906
9 changed files with 110 additions and 16 deletions
17
scenes/parallax_clouds.gd
Normal file
17
scenes/parallax_clouds.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends Node2D
|
||||
|
||||
var scroll_multiplier: float = 200
|
||||
|
||||
@onready var parallax_nodes = get_tree().get_nodes_in_group("parallax_clouds")
|
||||
|
||||
func _ready():
|
||||
EventBus.cloud_speed.connect(_on_cloud_speed)
|
||||
|
||||
func _on_cloud_speed():
|
||||
$CoffeeBuoy.hide()
|
||||
for node in parallax_nodes:
|
||||
if node is Parallax2D:
|
||||
var current_autoscroll = node.get_autoscroll()
|
||||
current_autoscroll.y += scroll_multiplier
|
||||
node.set_autoscroll(current_autoscroll)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue