-
Notifications
You must be signed in to change notification settings - Fork 0
/
player_info.gd
53 lines (46 loc) · 1.36 KB
/
player_info.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
extends Node2D
func start_with(player: Player) -> void:
var Level := preload("res://level.tscn")
var intro := Level.instantiate()
intro.player = player
intro.tree = DialogNode.new("Welcome. Please enter your name: ", Terminus.new());
add_child(intro)
await intro.done
while not player.player_name:
$Name.show()
$Name.text = ""
var box_abuse = Level.instantiate()
box_abuse.tree = DialogNode.new("", Terminus.new())
box_abuse.player = player
add_child(box_abuse)
move_child(box_abuse, 1)
await box_abuse.done
if not $Name.text: continue
$Name.hide()
var confirm = Level.instantiate()
confirm.tree = Choose2.new("You entered %s. Is that correct?" % [$Name.text], Terminus.new(
func(player):
player.player_name = $Name.text
), "Yes", Terminus.new(), "No")
confirm.player = player
add_child(confirm)
await confirm.done
var prns = Level.instantiate()
prns.player = player
prns.tree = Choose3.new("What are your pronouns?", Terminus.new(
func(player):
player.they = "he"
player.them = "him"
player.their = "his"
player.theirs = "his"
player.themself = "himself"
), "he/him", Terminus.new(
func(player):
player.they = "she"
player.them = "her"
player.their = "her"
player.theirs = "hers"
player.themself = "herself"
), "she/her", Terminus.new(), "they/them")
add_child(prns)
await prns.done