aboutsummaryrefslogtreecommitdiff
path: root/tutorial/popup.gd
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/popup.gd')
-rw-r--r--tutorial/popup.gd12
1 files changed, 9 insertions, 3 deletions
diff --git a/tutorial/popup.gd b/tutorial/popup.gd
index 1d4c59c..9eaf134 100644
--- a/tutorial/popup.gd
+++ b/tutorial/popup.gd
@@ -2,9 +2,10 @@ extends Label
class_name TutorialPopup
export var identifier = ""
-
+var time_on_screen = 0
+var _mt = false
func _input(event):
- if not is_visible_in_tree():
+ if not is_visible_in_tree() or time_on_screen < 2:
return
if event is InputEventMouseButton:
if event.pressed and event.button_index == BUTTON_LEFT:
@@ -17,9 +18,14 @@ func _trigger() -> bool:
func _ready():
hide() # like the goblin you are
+func manual_trigger():
+ _mt = true
+
func _process(delta):
if SaveState.tutorial[identifier]:
return
- if _trigger():
+ if is_visible_in_tree():
+ time_on_screen += delta
+ if _trigger() or _mt:
show()
get_tree().paused = true