summaryrefslogtreecommitdiff
path: root/scenes/levels
diff options
context:
space:
mode:
Diffstat (limited to 'scenes/levels')
-rw-r--r--scenes/levels/base_level.gd16
-rw-r--r--scenes/levels/base_level.tscn29
2 files changed, 40 insertions, 5 deletions
diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd
new file mode 100644
index 0000000..7eaf734
--- /dev/null
+++ b/scenes/levels/base_level.gd
@@ -0,0 +1,16 @@
+extends Node2D
+
+onready var pause_menu = $PauseMenu
+
+# Called when the node enters the scene tree for the first time.
+func _ready():
+ pass # Replace with function body.
+
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+#func _process(delta):
+# pass
+
+func _on_MenuButton_on_click():
+ pause_menu.visible = true
+ pause_menu.pause()
diff --git a/scenes/levels/base_level.tscn b/scenes/levels/base_level.tscn
index ab8e820..197b8d0 100644
--- a/scenes/levels/base_level.tscn
+++ b/scenes/levels/base_level.tscn
@@ -1,22 +1,28 @@
-[gd_scene load_steps=4 format=2]
+[gd_scene load_steps=8 format=2]
-[ext_resource path="res://textures/backgrounds/background_blue.png" type="Texture" id=1]
+[ext_resource path="res://textures/backgrounds/background_grey.png" type="Texture" id=1]
[ext_resource path="res://components/PathRenderer.gd" type="Script" id=2]
+[ext_resource path="res://components/healthbar/healtbar.tscn" type="PackedScene" id=3]
+[ext_resource path="res://components/button.tscn" type="PackedScene" id=4]
+[ext_resource path="res://scenes/pause.tscn" type="PackedScene" id=5]
+[ext_resource path="res://scenes/levels/base_level.gd" type="Script" id=6]
[sub_resource type="Curve2D" id=1]
_data = {
-"points": PoolVector2Array( 0, 0, 0, 0, -214.33, -262.484, 0, 0, 0, 0, 449.67, -270.484, 0, 0, 0, 0, 425.67, -534.484, 0, 0, 0, 0, -134.33, -790.484, 0, 0, 0, 0, -358.33, -630.484, 0, 0, 0, 0, -214.33, -262.484, 0, 0, 0, 0, 585.67, -902.484 )
+"points": PoolVector2Array( 0, 0, 0, 0, 498.557, 573.469, 0, 0, 0, 0, 260.715, 288.06, 0, 0, 0, 0, 18.117, 259.519, 0, 0, 0, 0, -224.481, 259.519, 0, 0, 0, 0, -348.159, 264.276, 0, 0, 0, 0, -362.429, 378.439, 0, 0, 0, 0, -357.672, 559.199 )
}
[node name="BaseLevel" type="Node2D"]
position = Vector2( 486.33, -65.5159 )
+script = ExtResource( 6 )
[node name="Camera2D" type="Camera2D" parent="."]
-position = Vector2( -46.33, -438.484 )
+position = Vector2( 153.457, 427.259 )
current = true
[node name="background_blue" type="Sprite" parent="Camera2D"]
-scale = Vector2( 0.667, 0.667 )
+position = Vector2( 8.47589, -0.203278 )
+scale = Vector2( 0.691279, 0.704278 )
texture = ExtResource( 1 )
[node name="PathRenderer" type="Node2D" parent="."]
@@ -24,3 +30,16 @@ script = ExtResource( 2 )
[node name="Path2D" type="Path2D" parent="PathRenderer"]
curve = SubResource( 1 )
+
+[node name="healthbar" parent="." instance=ExtResource( 3 )]
+position = Vector2( -441.92, 105.896 )
+maxhealth = 3
+offset = 60
+
+[node name="MenuButton" parent="." instance=ExtResource( 4 )]
+position = Vector2( 722.995, 115.66 )
+text = "Menu"
+
+[node name="PauseMenu" parent="." instance=ExtResource( 5 )]
+position = Vector2( 155.016, 424.068 )
+[connection signal="on_click" from="MenuButton" to="." method="_on_MenuButton_on_click"]