extends Node2D

onready var texture : TextureRect = $TextureRect

var moving = false

func stop():
	moving = false
	texture.material.set_shader_param("scroll_speed", 0)

func start():
	moving = true
	texture.material.set_shader_param("scroll_speed", 0.2)

func _process(delta):
	if get_tree().paused and moving:
		stop()
	elif not get_tree().paused and not moving:
		start()
