Wicked-Depths/endcam.gd

19 lines
577 B
GDScript3
Raw Normal View History

extends Camera2D
var end = 600
var read = false
# Called when the node enters the scene tree for the first time.
func _ready():
var tweener = get_tree().create_tween()
tweener.tween_property(self,"position",Vector2(0,end),40)
await tweener.finished
get_parent().get_node("RichTextLabel").text += "\n \n press [enter] to return to the main menu"
read = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
if read and Input.is_action_just_pressed("interact"):
get_tree().change_scene_to_file("res://menu.tscn")