From 965ef94ec0718dd5af9e7dbc29060c79f62d6b9b Mon Sep 17 00:00:00 2001 From: Jonas Bernard Date: Mon, 26 Apr 2021 00:29:57 +0200 Subject: Next part in story --- scenes/introduction/check_mail.tscn | 1 - scenes/introduction/introduction.tscn | 4 +-- scenes/introduction/mail.tscn | 8 ++++- scenes/levels/level1.gd | 24 --------------- scenes/levels/level1.tscn | 55 ----------------------------------- scenes/levels/reactiontest.gd | 24 +++++++++++++++ scenes/levels/reactiontest.tscn | 55 +++++++++++++++++++++++++++++++++++ 7 files changed, 88 insertions(+), 83 deletions(-) delete mode 100644 scenes/levels/level1.gd delete mode 100644 scenes/levels/level1.tscn create mode 100644 scenes/levels/reactiontest.gd create mode 100644 scenes/levels/reactiontest.tscn diff --git a/scenes/introduction/check_mail.tscn b/scenes/introduction/check_mail.tscn index b1b9fbb..eccdf90 100644 --- a/scenes/introduction/check_mail.tscn +++ b/scenes/introduction/check_mail.tscn @@ -96,7 +96,6 @@ 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_Log_in_on_click"] diff --git a/scenes/introduction/introduction.tscn b/scenes/introduction/introduction.tscn index 9bed978..dcd40bf 100644 --- a/scenes/introduction/introduction.tscn +++ b/scenes/introduction/introduction.tscn @@ -13,9 +13,9 @@ texture = ExtResource( 4 ) [node name="TextReveal" type="Label" parent="."] margin_left = -500.0 -margin_top = -200.0 +margin_top = -293.0 margin_right = 500.0 -margin_bottom = 200.0 +margin_bottom = 293.0 script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false diff --git a/scenes/introduction/mail.tscn b/scenes/introduction/mail.tscn index 34b7f6d..087791c 100644 --- a/scenes/introduction/mail.tscn +++ b/scenes/introduction/mail.tscn @@ -17,5 +17,11 @@ seen some \"mysterious actions\" around the streets in Washington. 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 times. Chaotic. Just chaotic." +Isn't that strange? I mean those times. Chaotic. Just chaotic. +Lets meet at George Washington Bridge at 7PM and talk +about what happend. Will you be there? + +See you + +Matt" [connection signal="next" from="CanvasLayer" to="." method="_on_CanvasLayer_next"] diff --git a/scenes/levels/level1.gd b/scenes/levels/level1.gd deleted file mode 100644 index 707b97a..0000000 --- a/scenes/levels/level1.gd +++ /dev/null @@ -1,24 +0,0 @@ -extends Level - -onready var buttons = $ButtonHolder.get_children() - -var sequence_index = 0 - -func _ready(): - for i in range(buttons.size()): - buttons[i].connect("on_click", self, "_on_Any_button_click", [i]) - buttons[i].text = str(i + 1) - if i != 0: - buttons[i].visible = false - -func _on_Any_button_click(btn_idx): - if btn_idx == sequence_index: - sequence_index += 1 - if sequence_index == buttons.size(): - finish_level() - return - buttons[sequence_index].visible = true - print("Correct button: ", btn_idx) - else: - lose_heart() - print("Incorrect button: ", btn_idx) diff --git a/scenes/levels/level1.tscn b/scenes/levels/level1.tscn deleted file mode 100644 index 7c52e6a..0000000 --- a/scenes/levels/level1.tscn +++ /dev/null @@ -1,55 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://scenes/levels/level1.gd" type="Script" id=1] -[ext_resource path="res://components/button.tscn" type="PackedScene" id=2] - -[node name="Level2" type="Node2D"] -position = Vector2( 640, 320 ) -script = ExtResource( 1 ) - -[node name="ButtonHolder" type="Node2D" parent="."] - -[node name="Button" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( -370.845, -187.832 ) -text = "1" -fixed_width = 30 - -[node name="Button2" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( -256.483, 79.5727 ) -text = "2" -fixed_width = 30 - -[node name="Button3" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( 269.918, 246.07 ) -text = "3" -fixed_width = 30 - -[node name="Button4" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( -401.118, 15.6646 ) -text = "4" -fixed_width = 30 - -[node name="Button5" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( -130.349, -46.5617 ) -text = "5" -fixed_width = 30 - -[node name="Button6" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( -158.94, 224.207 ) -text = "6" -fixed_width = 30 - -[node name="Button7" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( 128.647, 79.5727 ) -text = "7" -fixed_width = 30 - -[node name="Button8" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( 21.0123, -209.696 ) -text = "8" -fixed_width = 30 - -[node name="Button9" parent="ButtonHolder" instance=ExtResource( 2 )] -position = Vector2( 216.1, -39.8346 ) -text = "9" -fixed_width = 30 diff --git a/scenes/levels/reactiontest.gd b/scenes/levels/reactiontest.gd new file mode 100644 index 0000000..707b97a --- /dev/null +++ b/scenes/levels/reactiontest.gd @@ -0,0 +1,24 @@ +extends Level + +onready var buttons = $ButtonHolder.get_children() + +var sequence_index = 0 + +func _ready(): + for i in range(buttons.size()): + buttons[i].connect("on_click", self, "_on_Any_button_click", [i]) + buttons[i].text = str(i + 1) + if i != 0: + buttons[i].visible = false + +func _on_Any_button_click(btn_idx): + if btn_idx == sequence_index: + sequence_index += 1 + if sequence_index == buttons.size(): + finish_level() + return + buttons[sequence_index].visible = true + print("Correct button: ", btn_idx) + else: + lose_heart() + print("Incorrect button: ", btn_idx) diff --git a/scenes/levels/reactiontest.tscn b/scenes/levels/reactiontest.tscn new file mode 100644 index 0000000..8c98f6c --- /dev/null +++ b/scenes/levels/reactiontest.tscn @@ -0,0 +1,55 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/levels/reactiontest.gd" type="Script" id=1] +[ext_resource path="res://components/button.tscn" type="PackedScene" id=2] + +[node name="Level2" type="Node2D"] +position = Vector2( 640, 320 ) +script = ExtResource( 1 ) + +[node name="ButtonHolder" type="Node2D" parent="."] + +[node name="Button" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( -370.845, -187.832 ) +text = "1" +fixed_width = 30 + +[node name="Button2" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( -256.483, 79.5727 ) +text = "2" +fixed_width = 30 + +[node name="Button3" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( 269.918, 246.07 ) +text = "3" +fixed_width = 30 + +[node name="Button4" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( -401.118, 15.6646 ) +text = "4" +fixed_width = 30 + +[node name="Button5" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( -130.349, -46.5617 ) +text = "5" +fixed_width = 30 + +[node name="Button6" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( -158.94, 224.207 ) +text = "6" +fixed_width = 30 + +[node name="Button7" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( 128.647, 79.5727 ) +text = "7" +fixed_width = 30 + +[node name="Button8" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( 21.0123, -209.696 ) +text = "8" +fixed_width = 30 + +[node name="Button9" parent="ButtonHolder" instance=ExtResource( 2 )] +position = Vector2( 216.1, -39.8346 ) +text = "9" +fixed_width = 30 -- cgit