blob: 6d03cce54ae21eca9aa9f69fd1f960ec6e17580d (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
extends Node2D
onready var passwordfield = $password
var trys = 0
var correct = "correct"
func _ready():
pass # Replace with function body.
func login():
$Incorrect.visible = false
get_tree().change_scene("res://scenes/introduction/mail.tscn")
func check_pw():
if passwordfield.text == correct:
login()
else:
if passwordfield.text == "deeper" or trys == 5:
$Monolog2.start()
$Monolog1.visible = false
if trys == 10:
$Monolog3.start()
$Monolog2.visible = false
if trys == 15:
$Reset.visible = true
correct = "tom"
trys = trys + 1
$Incorrect.visible = true
passwordfield.text = ""
func _on_password_text_changed(new_text):
$Incorrect.visible = false
func _on_password_text_entered(new_text):
check_pw()
func _on_Log_in_on_click():
check_pw()
|