aboutsummaryrefslogtreecommitdiff
path: root/tutorial/popup.gd
blob: 1d4c59c48694983a42e6b736db7c1caad7d463df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
extends Label
class_name TutorialPopup

export var identifier = ""

func _input(event):
	if not is_visible_in_tree():
		return
	if event is InputEventMouseButton:
		if event.pressed and event.button_index == BUTTON_LEFT:
			SaveState.tutorial[identifier] = true
			hide()
			get_tree().paused = false

func _trigger() -> bool:
	return false
func _ready():
	hide() # like the goblin you are

func _process(delta):
	if SaveState.tutorial[identifier]:
		return
	if _trigger():
		show()
		get_tree().paused = true