-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRoot.gd
58 lines (39 loc) · 1.18 KB
/
Root.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
58
extends Spatial
# Called when the node enters the scene tree for the first time.
func _ready():
OS.window_fullscreen = true
var start = Corridor.new(Corridor.FOUREXIT)
var startScene = start.getNode()
var direction = Corridor.DOWN
start.setPosition(Vector3(0,0,0))
self.add_child(startScene)
var turn = Corridor.new(Corridor.T)
var t = turn
turn.setPositionRel(direction, start)
self.add_child(turn.getNode())
var last = turn
direction = Corridor.LEFT
turn = Corridor.new(Corridor.LREV)
turn.setPositionRel(direction, last)
self.add_child(turn.getNode())
last = turn
direction = Corridor.UP
turn = Corridor.new(Corridor.LREV)
turn.setPositionRel(direction, last)
self.add_child(turn.getNode())
last = t
direction = Corridor.RIGHT
turn = Corridor.new(Corridor.L)
turn.setPositionRel(direction, last)
self.add_child(turn.getNode())
last = turn
direction = Corridor.UP
turn = Corridor.new(Corridor.L)
turn.setPositionRel(direction, last)
self.add_child(turn.getNode())
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _input(_event):
if Input.is_action_pressed("exit"):
get_tree().quit()