From 9167422d825ff1451b2eb5e877b4f4abd1a73989 Mon Sep 17 00:00:00 2001 From: rom Date: Tue, 27 Apr 2021 02:26:24 +0200 Subject: continue --- scenes/story/story.gd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'scenes/story') diff --git a/scenes/story/story.gd b/scenes/story/story.gd index 8681d8e..70b4b01 100644 --- a/scenes/story/story.gd +++ b/scenes/story/story.gd @@ -1,5 +1,24 @@ extends Level +const button = preload("res://components/button.tscn") + +var _continue + +func _ready(): + _continue = button.instance() + _continue.position = Vector2(0, 300) + _continue.visible = false + _continue.text = "Continue" + _continue.connect("on_click", self, "cont") + $TextrevealBox.connect("finished_reveal", self, "show_continue") + add_child(_continue) + +func cont(): + finish_level() + +func show_continue(): + _continue.visible = true + func start(): .start() $TextrevealBox.start() -- cgit