diff options
author | Roman Gräf <romangraef@gmail.com> | 2020-04-20 20:28:13 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@gmail.com> | 2020-04-20 20:28:13 +0200 |
commit | dc641d85ff4f610c9239a87c1bcfd123e744f3cf (patch) | |
tree | dc38ad06cb0f7579d5043edef9ac2449abefdd2f /tutorial/popup.gd | |
parent | c1b75c16eb5132017786134ec61bdf38bf1f6680 (diff) | |
download | LDJam46-dc641d85ff4f610c9239a87c1bcfd123e744f3cf.tar.gz LDJam46-dc641d85ff4f610c9239a87c1bcfd123e744f3cf.tar.bz2 LDJam46-dc641d85ff4f610c9239a87c1bcfd123e744f3cf.zip |
mehr tutorials und konami code
Diffstat (limited to 'tutorial/popup.gd')
-rw-r--r-- | tutorial/popup.gd | 12 |
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 |