diff options
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/levels/base_level.gd | 16 | ||||
-rw-r--r-- | scenes/levels/repeat_this.tscn | 18 | ||||
-rw-r--r-- | scenes/levels/typeracer.gd | 8 | ||||
-rw-r--r-- | scenes/levels/typeracer.tscn | 8 | ||||
-rw-r--r-- | scenes/pause.tscn | 1 | ||||
-rw-r--r-- | scenes/story/1_bridge.tscn | 20 | ||||
-rw-r--r-- | scenes/story/2_pizza.tscn | 19 | ||||
-rw-r--r-- | scenes/story/3_go_deeper.tscn | 18 | ||||
-rw-r--r-- | scenes/story/4_prison.tscn | 17 | ||||
-rw-r--r-- | scenes/story/5_illuminati.tscn | 20 | ||||
-rw-r--r-- | scenes/story/6_end.tscn | 15 | ||||
-rw-r--r-- | scenes/story/story.gd | 5 |
12 files changed, 136 insertions, 29 deletions
diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index 7add4cc..8261337 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -7,12 +7,18 @@ onready var _path_renderer : PathRenderer = $PathRenderer onready var _health_bar = $Camera2D/healthbar onready var _last_camera_location : Vector2 = $Camera2D.position const _levels = [ - #preload("res://scenes/levels/hearts_introduce.tscn"), - #preload("res://scenes/levels/typeracer_explain.tscn"), - #preload("res://scenes/levels/typeracer.tscn"), - #preload("res://scenes/levels/reactiontest.tscn"), - #preload("res://scenes/levels/pixel/PixelDefender.tscn"), + preload("res://scenes/levels/hearts_introduce.tscn"), + preload("res://scenes/levels/typeracer_explain.tscn"), + preload("res://scenes/levels/typeracer.tscn"), + preload("res://scenes/story/1_bridge.tscn"), + preload("res://scenes/story/2_pizza.tscn"), + preload("res://scenes/levels/pixel/PixelDefender.tscn"), + preload("res://scenes/story/3_go_deeper.tscn"), + preload("res://scenes/story/4_prison.tscn"), preload("res://scenes/levels/puzzle/puzzle.tscn"), + preload("res://scenes/story/5_illuminati.tscn"), + preload("res://scenes/levels/reactiontest.tscn"), + preload("res://scenes/story/6_end.tscn"), ] var _current_level = 0 diff --git a/scenes/levels/repeat_this.tscn b/scenes/levels/repeat_this.tscn deleted file mode 100644 index e96cc34..0000000 --- a/scenes/levels/repeat_this.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://components/Level.gd" type="Script" id=1] -[ext_resource path="res://components/textreveal.gd" type="Script" id=2] - -[node name="Level" type="Node2D"] -script = ExtResource( 1 ) - -[node name="Insturction" type="Label" parent="."] -margin_left = 373.0 -margin_top = 564.0 -margin_right = 951.0 -margin_bottom = 668.0 -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} -to_render = "Repeat the pattern" diff --git a/scenes/levels/typeracer.gd b/scenes/levels/typeracer.gd index 35225be..e91e360 100644 --- a/scenes/levels/typeracer.gd +++ b/scenes/levels/typeracer.gd @@ -5,6 +5,8 @@ onready var timer_label = $TimeLabel var timer = 0 var total = 0 +var started = false + func start(): .start() total = _total_time() @@ -20,13 +22,15 @@ func _total_time(): func _process(delta): if not running: return + if not started: + return timer += delta timer_label.text = str(total - timer) if timer >= total: eval() func eval(): - if $Label.text.replace('\r\n', '\n').replace('\r', '\n') == $TextEdit.text.replace('\r\n', '\n').replace('\r', '\n'): + if $Label.text.replace('\r\n', '').replace('\r', '').replace(' ', '') == $TextEdit.text.replace('\r\n', '').replace('\r', '').replace(' ', ''): $TextEdit.readonly = true $Button.disabled = true $Incorrect.visible = false @@ -49,4 +53,6 @@ func _on_Button_on_click(): func _on_TextEdit_text_changed(): + if not started: + started = true eval_corr() diff --git a/scenes/levels/typeracer.tscn b/scenes/levels/typeracer.tscn index 4902263..60a13b0 100644 --- a/scenes/levels/typeracer.tscn +++ b/scenes/levels/typeracer.tscn @@ -48,10 +48,10 @@ __meta__ = { } [node name="TimeLabel" type="Label" parent="."] -margin_left = -463.0 -margin_top = -255.0 -margin_right = -291.0 -margin_bottom = -209.0 +margin_left = -397.897 +margin_top = -237.041 +margin_right = -225.897 +margin_bottom = -191.041 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/pause.tscn b/scenes/pause.tscn index 65f71e3..6e94b37 100644 --- a/scenes/pause.tscn +++ b/scenes/pause.tscn @@ -47,6 +47,5 @@ valign = 1 __meta__ = { "_edit_use_anchors_": false } - [connection signal="on_click" from="Node2D/Resume" to="." method="_on_Resume_on_click"] [connection signal="on_click" from="Node2D/Main Menu" to="." method="_on_Main_Menu_on_click"] diff --git a/scenes/story/1_bridge.tscn b/scenes/story/1_bridge.tscn new file mode 100644 index 0000000..2c0586d --- /dev/null +++ b/scenes/story/1_bridge.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/story/story.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +position = Vector2( -2.65454, 2.2403 ) +text = "I met Matt at Washington Bridge and all the while +we walked to Marcus' Pizza Palace, i couldn't help, but +feel as if we were being followed. I sure hope that THEY +didn't find me again. I might as well enjoy my meal while +I'm here." +autostart = false diff --git a/scenes/story/2_pizza.tscn b/scenes/story/2_pizza.tscn new file mode 100644 index 0000000..cd1e3d3 --- /dev/null +++ b/scenes/story/2_pizza.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/story/story.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +text = "The pizza was delicious, as was to be expected, and talking +to the server yielded quite a lot of interesting information: +Marcus WAS in fact being pressured into selling off his place. +At least for once my inhuman intuition was right! I sure hope +I don't get ambushed on my way home." +autostart = false diff --git a/scenes/story/3_go_deeper.tscn b/scenes/story/3_go_deeper.tscn new file mode 100644 index 0000000..6ca070f --- /dev/null +++ b/scenes/story/3_go_deeper.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/story/story.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +text = "There simply are too many enemies to fight and I don't even +know who they are. I think my best plan is to give in and +let myself get captured. I have to go deeper. Maybe i can +gather more intel while on the inside." +autostart = false diff --git a/scenes/story/4_prison.tscn b/scenes/story/4_prison.tscn new file mode 100644 index 0000000..0fcdc3c --- /dev/null +++ b/scenes/story/4_prison.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/story/story.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +text = "They locked me inside this prison cell. The lock looks +pickable. Maybe the code is just to arrange the numbers, +and bring the empty slot to the lower right." +autostart = false diff --git a/scenes/story/5_illuminati.tscn b/scenes/story/5_illuminati.tscn new file mode 100644 index 0000000..d94400a --- /dev/null +++ b/scenes/story/5_illuminati.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/story/story.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +text = "On my way out I spot a guard wearing an Illuminati Badge +around their arm. This can only mean one thing! The Illuminati +are behind this plot to close Marcus' Pizza Place! I should've +known only those cheese-haters would be capable of such +CRUELTY! Now, if i act quick, i might be able to disarm the guard, +before they are able to ring alarm." +autostart = false diff --git a/scenes/story/6_end.tscn b/scenes/story/6_end.tscn new file mode 100644 index 0000000..791cb72 --- /dev/null +++ b/scenes/story/6_end.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/story/story.gd" type="Script" id=1] +[ext_resource path="res://components/textrevealbox.tscn" type="PackedScene" id=2] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] + +[node name="TextrevealBox" parent="." instance=ExtResource( 2 )] +text = "Phew, close fight. This Illuminati must've been a bit on the tougher +side. I knew they would bring out the big guns to keep me in. Now, +off to inform the press of my discoveries!" +autostart = false diff --git a/scenes/story/story.gd b/scenes/story/story.gd new file mode 100644 index 0000000..8681d8e --- /dev/null +++ b/scenes/story/story.gd @@ -0,0 +1,5 @@ +extends Level + +func start(): + .start() + $TextrevealBox.start() |