summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scenes/levels/base_level.gd2
-rw-r--r--scenes/story/newspaper.gd9
-rw-r--r--scenes/story/newspaper.tscn13
3 files changed, 22 insertions, 2 deletions
diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd
index 8261337..2684be9 100644
--- a/scenes/levels/base_level.gd
+++ b/scenes/levels/base_level.gd
@@ -7,6 +7,7 @@ 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/story/newspaper.tscn"),
preload("res://scenes/levels/hearts_introduce.tscn"),
preload("res://scenes/levels/typeracer_explain.tscn"),
preload("res://scenes/levels/typeracer.tscn"),
@@ -19,6 +20,7 @@ const _levels = [
preload("res://scenes/story/5_illuminati.tscn"),
preload("res://scenes/levels/reactiontest.tscn"),
preload("res://scenes/story/6_end.tscn"),
+ preload("res://scenes/story/newspaper.tscn"),
]
var _current_level = 0
diff --git a/scenes/story/newspaper.gd b/scenes/story/newspaper.gd
new file mode 100644
index 0000000..cb9743f
--- /dev/null
+++ b/scenes/story/newspaper.gd
@@ -0,0 +1,9 @@
+extends Level
+
+
+func cont():
+ get_tree().change_scene("res://scenes/menu.tscn")
+
+
+func _on_Button_on_click():
+ cont()
diff --git a/scenes/story/newspaper.tscn b/scenes/story/newspaper.tscn
index 5c97140..56b77f1 100644
--- a/scenes/story/newspaper.tscn
+++ b/scenes/story/newspaper.tscn
@@ -1,11 +1,14 @@
-[gd_scene load_steps=2 format=2]
+[gd_scene load_steps=4 format=2]
[ext_resource path="res://textures/newspaper.png" type="Texture" id=1]
+[ext_resource path="res://scenes/story/newspaper.gd" type="Script" id=2]
+[ext_resource path="res://components/button.tscn" type="PackedScene" id=3]
[node name="Node2D" type="Node2D"]
+script = ExtResource( 2 )
[node name="newspaper" type="Sprite" parent="."]
-position = Vector2( -11.4611, 15.9832 )
+scale = Vector2( 0.729248, 0.729248 )
texture = ExtResource( 1 )
[node name="Node2D" type="Node2D" parent="newspaper"]
@@ -51,3 +54,9 @@ City council confirms citizens have \"not to worry\" about giant floating eyes i
__meta__ = {
"_edit_use_anchors_": false
}
+
+[node name="Button" parent="newspaper" instance=ExtResource( 3 )]
+position = Vector2( 2.06922, 371.448 )
+text = "Back to Menu"
+
+[connection signal="on_click" from="newspaper/Button" to="." method="_on_Button_on_click"]