extends StaticBody2D

# Directional move platform
var directional = false 
# false - down
# true - up 
var interval = 3
onready var top_threshold = self.global_position.y - interval
onready var down_threshold = self.global_position.y + interval
const step = 0.1

func _on_TranslateTimer_timeout():
	if self.global_position.y == top_threshold:
		directional = !directional
	elif self.global_position.y == down_threshold:
		directional = !directional

	if directional:
		self.global_position.y -= step
	else:
		self.global_position.y += step
