1
Fork 0
mirror of https://github.com/Steffo99/looping-for-loops.git synced 2024-11-22 08:04:23 +00:00
looping-for-loops/Objects/ScrollingObjects/Buttons/CBSpeedChangeButton.gd

14 lines
288 B
GDScript3
Raw Normal View History

2020-10-04 18:26:45 +00:00
extends GameButton
class_name CBSpeedChangeButton
export(float) var change: float = -30
var conveyor_belt: ConveyorBelt = null
func _ready():
conveyor_belt = get_tree().current_scene.get_node("ConveyorBelt")
2020-10-05 20:20:12 +00:00
func _on_CBSpeedChangeButton_clicked():
2020-10-04 18:26:45 +00:00
conveyor_belt.cb_speed += change