-
Notifications
You must be signed in to change notification settings - Fork 4
/
going_to_line.gd
58 lines (38 loc) · 1.19 KB
/
going_to_line.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
extends Control
var father = null
var node = {'id':''}
onready var my_button = $MarginContainer/my_button
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
func _init():
#print('LINE INIT')
#print('MY BUTTON: %s' % self.my_button)
pass
func _ready():
var my_button = $MarginContainer/my_button
func set_node(node_):
var _my_button = $MarginContainer/my_button
#print('BUTTON: %s' % my_button)
#print('Give us a node_: %s' % node_)
self.node = node_
_my_button.text = "=> %3d" % self.node.get_id()
# Look at icons now
# Combats
if self.node.is_combat():
$MarginContainer/combat.visible = true
# Show endings
if self.node.get_ending() != false:
$MarginContainer/end.visible = true
func set_father(father_):
self.father = father_
func set_session_already_visited():
print('SET LINE %s as session already visited' % self.node.get_id())
func set_all_times_already_visited():
print('SET LINE %s as all times already visited' % self.node.get_id())
var tick = $MarginContainer/already_visited
tick.visible = true
func _on_Button_pressed():
print('2 CLICK onto node: %s' % self.node)
if self.father != null:
self.father.go_to_node(self.node.get_id())