1
Fork 0
mirror of https://github.com/Steffo99/looping-for-loops.git synced 2024-11-24 17:14:22 +00:00
looping-for-loops/Objects/ScrollingObjects/Utilities/ScrollParent.gd

15 lines
239 B
GDScript3
Raw Normal View History

2020-10-04 14:35:24 +00:00
extends Node
class_name ScrollParent
export(Vector2) var scroll_velocity: Vector2 = Vector2(0, 0)
2020-10-04 14:35:24 +00:00
var parent = null
func _enter_tree():
parent = get_parent()
func _physics_process(delta):
parent.position += scroll_velocity * delta