diff options
author | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 01:06:07 +0200 |
---|---|---|
committer | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 01:06:07 +0200 |
commit | 87b442183d2ad8831fe70b2694821441dbb62a9a (patch) | |
tree | 1233d037cbc4362dc28e0334308a96358df5f3d1 /scenes/introduction | |
parent | 58de242581f6f9b57138a0a4772a62155d30f551 (diff) | |
download | ldjam48-87b442183d2ad8831fe70b2694821441dbb62a9a.tar.gz ldjam48-87b442183d2ad8831fe70b2694821441dbb62a9a.tar.bz2 ldjam48-87b442183d2ad8831fe70b2694821441dbb62a9a.zip |
Better Mail Level
Diffstat (limited to 'scenes/introduction')
-rw-r--r-- | scenes/introduction/check_mail.gd | 6 | ||||
-rw-r--r-- | scenes/introduction/check_mail.tscn | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/scenes/introduction/check_mail.gd b/scenes/introduction/check_mail.gd index 4474f39..a2b20c4 100644 --- a/scenes/introduction/check_mail.gd +++ b/scenes/introduction/check_mail.gd @@ -2,6 +2,7 @@ extends Node2D onready var passwordfield = $password var trys = 0 +var correct = "correct" func _ready(): pass # Replace with function body. @@ -11,7 +12,7 @@ func login(): get_tree().change_scene("res://scenes/introduction/mail.tscn") func check_pw(): - if passwordfield.text == "correct": + if passwordfield.text == correct: login() else: if passwordfield.text == "deeper" or trys == 10: @@ -20,6 +21,9 @@ func check_pw(): if trys == 20: $Monolog3.start() $Monolog2.visible = false + if trys == 30: + $Reset.visible = true + correct = "tom" trys = trys + 1 $Incorrect.visible = true passwordfield.text = "" diff --git a/scenes/introduction/check_mail.tscn b/scenes/introduction/check_mail.tscn index b1b9fbb..6f6c1e2 100644 --- a/scenes/introduction/check_mail.tscn +++ b/scenes/introduction/check_mail.tscn @@ -97,6 +97,16 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="Reset" type="Label" parent="."] +visible = false +margin_left = 306.457 +margin_top = 52.6645 +margin_right = 995.457 +margin_bottom = 84.6645 +text = "Too many trys. Password was reset to \"tom\"" +__meta__ = { +"_edit_use_anchors_": false +} [connection signal="text_changed" from="password" to="." method="_on_password_text_changed"] [connection signal="text_entered" from="password" to="." method="_on_password_text_entered"] [connection signal="on_click" from="Log in" to="." method="_on_Log_in_on_click"] |