/
level2.gd
35 lines (28 loc) · 975 Bytes
/
level2.gd
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
26
27
28
29
30
31
32
33
34
35
extends Node
# class member variables go here, for example:
# var a = 2
# var b = "textvar"
var visible = false
var tui = preload("tui.gd")
var map = [["d", "c", "f", "s"],
["s", "f", "c", "d"],
["f", "c", "s", "f"],
["d", "d", "f", "c"]]
func _ready():
# Called every time the node is added to the scene.
# Initialization here
#self.connect("input_event", self, "_on_input")
set_process(true)
get_node("TextEdit").hide()
func _process(delta):
if Input.is_mouse_button_pressed(1) and not visible:
print("clicked")
get_node("TextEdit").show()
visible = true
tui.new(self, get_node("TextEdit"), map, 1300, "res://level3.tscn",
"You find yourself in a similar room to before. Guess\n" +
"they didn't fix that bug after all. Oh well.\n",
"A voice announces, \"You have reached the point goal! Sorry\n" +
"the bug wasn't fixed - I think we've done it now. Press Enter\n" +
"to re-enable graphics again.\"",
get_node("Timer"))