From 29a0e70181cb7c2aa8f6e051138772965e678522 Mon Sep 17 00:00:00 2001 From: Jonas Bernard Date: Sun, 25 Apr 2021 22:55:56 +0200 Subject: Password level 1 --- scenes/introduction.gd | 21 ------- scenes/introduction.tscn | 47 ---------------- scenes/introduction/check_mail.tscn | 101 ++++++++++++++++++++++++++++++++++ scenes/introduction/come home.gd | 4 ++ scenes/introduction/come home.tscn | 18 ++++++ scenes/introduction/introduction.gd | 24 ++++++++ scenes/introduction/introduction.tscn | 34 ++++++++++++ scenes/introduction/mail.gd | 5 ++ scenes/introduction/mail.tscn | 21 +++++++ scenes/menu.gd | 2 +- 10 files changed, 208 insertions(+), 69 deletions(-) delete mode 100644 scenes/introduction.gd delete mode 100644 scenes/introduction.tscn create mode 100644 scenes/introduction/check_mail.tscn create mode 100644 scenes/introduction/come home.gd create mode 100644 scenes/introduction/come home.tscn create mode 100644 scenes/introduction/introduction.gd create mode 100644 scenes/introduction/introduction.tscn create mode 100644 scenes/introduction/mail.gd create mode 100644 scenes/introduction/mail.tscn (limited to 'scenes') diff --git a/scenes/introduction.gd b/scenes/introduction.gd deleted file mode 100644 index 383091b..0000000 --- a/scenes/introduction.gd +++ /dev/null @@ -1,21 +0,0 @@ -extends Level - - -# Called when the node enters the scene tree for the first time. -func _ready(): - $Continue.visible = false - $TextReveal.start() - - - -func _on_TextReveal_finished_reveal(): - $Continue.visible = true - $Skip.visible = false - - -func _on_Button_on_click(): - get_tree().change_scene("res://scenes/levels/base_level.tscn") - - -func _on_Skip_on_click(): - get_tree().change_scene("res://scenes/levels/base_level.tscn") diff --git a/scenes/introduction.tscn b/scenes/introduction.tscn deleted file mode 100644 index fc5abc1..0000000 --- a/scenes/introduction.tscn +++ /dev/null @@ -1,47 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://components/textreveal.gd" type="Script" id=1] -[ext_resource path="res://scenes/introduction.gd" type="Script" id=2] -[ext_resource path="res://components/button.tscn" type="PackedScene" id=3] -[ext_resource path="res://textures/backgrounds/background_grey.png" type="Texture" id=4] - -[node name="CanvasLayer" type="Node2D"] -position = Vector2( 654.009, 325.417 ) -script = ExtResource( 2 ) - -[node name="background_grey" type="Sprite" parent="."] -texture = ExtResource( 4 ) - -[node name="TextReveal" type="Label" parent="."] -margin_left = -500.0 -margin_top = -16.0 -margin_right = 500.0 -margin_bottom = 366.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} -to_render = "Hi Tim, - -past monday, the following happend to me: - -I played deeper but lighter... - -this was just incredible. Try it out yourself. - -Kind reguards, - -Max" -speed = 10.0 - -[node name="Continue" parent="." instance=ExtResource( 3 )] -position = Vector2( 10, 260 ) -text = "Continue" - -[node name="Skip" parent="." instance=ExtResource( 3 )] -position = Vector2( 557.234, 339.165 ) -text = "Skip" - -[connection signal="finished_reveal" from="TextReveal" to="." method="_on_TextReveal_finished_reveal"] -[connection signal="on_click" from="Continue" to="." method="_on_Button_on_click"] -[connection signal="on_click" from="Skip" to="." method="_on_Skip_on_click"] diff --git a/scenes/introduction/check_mail.tscn b/scenes/introduction/check_mail.tscn new file mode 100644 index 0000000..6983820 --- /dev/null +++ b/scenes/introduction/check_mail.tscn @@ -0,0 +1,101 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://components/Level.gd" type="Script" id=1] +[ext_resource path="res://components/card/card.gd" type="Script" id=2] +[ext_resource path="res://fonts/Flipps_Theme.tres" type="Theme" id=3] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=4] +[ext_resource path="res://components/button.tscn" type="PackedScene" id=5] + +[node name="Level" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Card" type="Sprite" parent="."] +position = Vector2( 640, 320 ) +script = ExtResource( 2 ) +width = 600 +height = 400 + +[node name="username" type="LineEdit" parent="."] +margin_left = 534.333 +margin_top = 241.937 +margin_right = 746.333 +margin_bottom = 283.937 +text = "Tom" +editable = false +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="password" type="LineEdit" parent="."] +margin_left = 534.333 +margin_top = 298.667 +margin_right = 746.333 +margin_bottom = 340.667 +secret = true +placeholder_text = "Password" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Log in" parent="." instance=ExtResource( 5 )] +position = Vector2( 640.861, 400.15 ) +text = "Log in" + +[node name="Monolog1" parent="." instance=ExtResource( 4 )] +position = Vector2( 640, 600 ) +text = "Oh, shit, what was my password again?" + +[node name="Monolog2" parent="." instance=ExtResource( 4 )] +position = Vector2( 640, 600 ) +text = "The password is deeper than *you think*..." +autostart = false + +[node name="Monolog3" parent="." instance=ExtResource( 4 )] +position = Vector2( 640, 600 ) +text = "The correct password is not incorrect." +autostart = false + +[node name="Instuction" type="RichTextLabel" parent="."] +margin_left = 963.0 +margin_top = 191.0 +margin_right = 1276.0 +margin_bottom = 420.0 +bbcode_enabled = true +bbcode_text = "Fill in the form +with a password +*you think* is +correct." +text = "Fill in the form +with a password +*you think* is +correct." +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Incorrect" type="Label" parent="."] +visible = false +margin_left = 535.0 +margin_top = 440.858 +margin_right = 746.0 +margin_bottom = 478.858 +theme = ExtResource( 3 ) +text = "Incorrect." +align = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="DeepMail" type="Label" parent="."] +margin_left = 534.0 +margin_top = 167.0 +margin_right = 747.0 +margin_bottom = 222.0 +text = "DeepMail" +align = 1 +__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_Button_on_click"] diff --git a/scenes/introduction/come home.gd b/scenes/introduction/come home.gd new file mode 100644 index 0000000..9eb447c --- /dev/null +++ b/scenes/introduction/come home.gd @@ -0,0 +1,4 @@ +extends Node2D + +func _on_CanvasLayer_next(): + get_tree().change_scene("res://scenes/introduction/check_mail.tscn") diff --git a/scenes/introduction/come home.tscn b/scenes/introduction/come home.tscn new file mode 100644 index 0000000..c8a53a9 --- /dev/null +++ b/scenes/introduction/come home.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/introduction/introduction.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/introduction/come home.gd" type="Script" id=2] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 2 ) + +[node name="CanvasLayer" parent="." instance=ExtResource( 1 )] +position = Vector2( 640, 360 ) +text = "28.07.2048 +06:26 PM + +Oh, what a day was that... + +Let's first check my mails now... +" +[connection signal="next" from="CanvasLayer" to="." method="_on_CanvasLayer_next"] diff --git a/scenes/introduction/introduction.gd b/scenes/introduction/introduction.gd new file mode 100644 index 0000000..f9d60d1 --- /dev/null +++ b/scenes/introduction/introduction.gd @@ -0,0 +1,24 @@ +extends Level + +export(String, MULTILINE) var text = "" + +signal next() + +# Called when the node enters the scene tree for the first time. +func _ready(): + $Continue.visible = false + $TextReveal.to_render = text + $TextReveal.start() + +func _on_TextReveal_finished_reveal(): + $Continue.visible = true + $Skip.visible = false + +func _next(): + emit_signal("next") + +func _on_Button_on_click(): + _next() + +func _on_Skip_on_click(): + _next() diff --git a/scenes/introduction/introduction.tscn b/scenes/introduction/introduction.tscn new file mode 100644 index 0000000..9bed978 --- /dev/null +++ b/scenes/introduction/introduction.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://components/textreveal.gd" type="Script" id=1] +[ext_resource path="res://scenes/introduction/introduction.gd" type="Script" id=2] +[ext_resource path="res://components/button.tscn" type="PackedScene" id=3] +[ext_resource path="res://textures/backgrounds/background_grey.png" type="Texture" id=4] + +[node name="CanvasLayer" type="Node2D"] +script = ExtResource( 2 ) + +[node name="background_grey" type="Sprite" parent="."] +texture = ExtResource( 4 ) + +[node name="TextReveal" type="Label" parent="."] +margin_left = -500.0 +margin_top = -200.0 +margin_right = 500.0 +margin_bottom = 200.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} +to_render = "Failed to load Tex :(" + +[node name="Continue" parent="." instance=ExtResource( 3 )] +position = Vector2( 0, 250 ) +text = "Continue" + +[node name="Skip" parent="." instance=ExtResource( 3 )] +position = Vector2( 545.262, 293.882 ) +text = "Skip" +[connection signal="finished_reveal" from="TextReveal" to="." method="_on_TextReveal_finished_reveal"] +[connection signal="on_click" from="Continue" to="." method="_on_Button_on_click"] +[connection signal="on_click" from="Skip" to="." method="_on_Skip_on_click"] diff --git a/scenes/introduction/mail.gd b/scenes/introduction/mail.gd new file mode 100644 index 0000000..4a57120 --- /dev/null +++ b/scenes/introduction/mail.gd @@ -0,0 +1,5 @@ +extends Node2D + + +func _on_CanvasLayer_next(): + get_tree().change_scene("res://scenes/levels/base_level.tscn") diff --git a/scenes/introduction/mail.tscn b/scenes/introduction/mail.tscn new file mode 100644 index 0000000..383f809 --- /dev/null +++ b/scenes/introduction/mail.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/introduction/introduction.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/introduction/mail.gd" type="Script" id=2] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 2 ) + +[node name="CanvasLayer" parent="." instance=ExtResource( 1 )] +position = Vector2( 640, 360 ) +text = "Hey Tom, + +how are you going? +Did you read that article in the newspaper this +morning? Barak Obama himself stated to have +seen some \"mysteriois actions\" around the streets in Washinton. +They have to do with some data leaks in a datacenter nearby. +But they could not give any more information, they wrote. + +Isn't that strange? I mean those time. Chaotic. Just chaotic." +[connection signal="next" from="CanvasLayer" to="." method="_on_CanvasLayer_next"] diff --git a/scenes/menu.gd b/scenes/menu.gd index 7ce511c..e4f254e 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -15,4 +15,4 @@ func _on_Strart_on_click(): func _on_Outgoing_animation_finished(anim_name): - get_tree().change_scene("res://scenes/introduction.tscn") + get_tree().change_scene("res://scenes/introduction/come home.tscn") -- cgit