summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernard <public.jbernard@web.de>2021-04-25 00:39:49 +0200
committerJonas Bernard <public.jbernard@web.de>2021-04-25 00:39:49 +0200
commit66a83b84af05256c468f4cc47545ce592a9353fc (patch)
treeb689ddd46ebe95eed9d0ed2bc14cfebbad19d867
parent7d3d98f6b6546d8ddcd7a2a4c8e9431c59880223 (diff)
downloadldjam48-66a83b84af05256c468f4cc47545ce592a9353fc.tar.gz
ldjam48-66a83b84af05256c468f4cc47545ce592a9353fc.tar.bz2
ldjam48-66a83b84af05256c468f4cc47545ce592a9353fc.zip
pause
-rw-r--r--.import/heart.png-7624e148278eed12edb42012983cd6b6.md54
-rw-r--r--.import/heart.png-7624e148278eed12edb42012983cd6b6.stexbin202 -> 265 bytes
-rw-r--r--.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.md54
-rw-r--r--.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.stexbin195 -> 222 bytes
-rw-r--r--components/healthbar/healtbar.gd1
-rw-r--r--scenes/levels/base_level.gd16
-rw-r--r--scenes/levels/base_level.tscn29
-rw-r--r--scenes/pause.gd8
-rw-r--r--scenes/pause.tscn21
-rw-r--r--textures/icons/heart.pngbin637 -> 668 bytes
-rw-r--r--textures/icons/heart.xcfbin1050 -> 1838 bytes
-rw-r--r--textures/icons/heart_fill.pngbin641 -> 672 bytes
-rw-r--r--textures/icons/heart_fill.png.import2
-rw-r--r--textures/icons/heart_fill.xcfbin899 -> 1487 bytes
14 files changed, 75 insertions, 10 deletions
diff --git a/.import/heart.png-7624e148278eed12edb42012983cd6b6.md5 b/.import/heart.png-7624e148278eed12edb42012983cd6b6.md5
index 77ca65e..4a341d8 100644
--- a/.import/heart.png-7624e148278eed12edb42012983cd6b6.md5
+++ b/.import/heart.png-7624e148278eed12edb42012983cd6b6.md5
@@ -1,3 +1,3 @@
-source_md5="fdf9dd427c5dce1e61a2bd81f84ce10d"
-dest_md5="92e788cd81f2b4677c2b1a7100215988"
+source_md5="6b135f0e26df3df6452d798d8ac55b5f"
+dest_md5="08c3520c2746100eb83d474f1f0ae55f"
diff --git a/.import/heart.png-7624e148278eed12edb42012983cd6b6.stex b/.import/heart.png-7624e148278eed12edb42012983cd6b6.stex
index 46e57fc..64cf44c 100644
--- a/.import/heart.png-7624e148278eed12edb42012983cd6b6.stex
+++ b/.import/heart.png-7624e148278eed12edb42012983cd6b6.stex
Binary files differ
diff --git a/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.md5 b/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.md5
index f4903d3..d6907e1 100644
--- a/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.md5
+++ b/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.md5
@@ -1,3 +1,3 @@
-source_md5="09ad276449ed00d960e8a41a35867d08"
-dest_md5="bacb313ef9e2f2110d830c12f58e753c"
+source_md5="f01eb6414004eb3d8bb9dd1ddc6d7df1"
+dest_md5="aa2de0a26d461efbb375347cdd0b02bd"
diff --git a/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.stex b/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.stex
index 59ef12c..a492022 100644
--- a/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.stex
+++ b/.import/heart_fill.png-1a7e948022df354987966bfc5510fbc4.stex
Binary files differ
diff --git a/components/healthbar/healtbar.gd b/components/healthbar/healtbar.gd
index ee9915f..a78a81d 100644
--- a/components/healthbar/healtbar.gd
+++ b/components/healthbar/healtbar.gd
@@ -14,6 +14,7 @@ func _ready():
var heart = h.instance()
hearts.append(heart)
heart.position = Vector2(i * offset, 0)
+ heart.scale = Vector2(3,3)
add_child(heart)
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"]
diff --git a/scenes/pause.gd b/scenes/pause.gd
new file mode 100644
index 0000000..546ae93
--- /dev/null
+++ b/scenes/pause.gd
@@ -0,0 +1,8 @@
+extends Node2D
+
+onready var pause_menu = $"."
+
+func pause():
+ pause_menu.pause_mode = PAUSE_MODE_PROCESS
+ get_tree().paused = true
+
diff --git a/scenes/pause.tscn b/scenes/pause.tscn
new file mode 100644
index 0000000..872362f
--- /dev/null
+++ b/scenes/pause.tscn
@@ -0,0 +1,21 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://components/button.tscn" type="PackedScene" id=1]
+[ext_resource path="res://scenes/pause.gd" type="Script" id=2]
+
+[node name="PauseMenu" type="Node2D"]
+pause_mode = 2
+visible = false
+script = ExtResource( 2 )
+
+[node name="Resume" parent="." instance=ExtResource( 1 )]
+pause_mode = 2
+position = Vector2( -1.68179, -50 )
+text = "Resume"
+fixed_width = 250
+
+[node name="Main Menu" parent="." instance=ExtResource( 1 )]
+pause_mode = 2
+position = Vector2( -1.68179, 50 )
+text = "Main Menu"
+fixed_width = 250
diff --git a/textures/icons/heart.png b/textures/icons/heart.png
index 00fd382..3c74780 100644
--- a/textures/icons/heart.png
+++ b/textures/icons/heart.png
Binary files differ
diff --git a/textures/icons/heart.xcf b/textures/icons/heart.xcf
index 3ff39a3..dbed9c1 100644
--- a/textures/icons/heart.xcf
+++ b/textures/icons/heart.xcf
Binary files differ
diff --git a/textures/icons/heart_fill.png b/textures/icons/heart_fill.png
index 8749855..47b01c2 100644
--- a/textures/icons/heart_fill.png
+++ b/textures/icons/heart_fill.png
Binary files differ
diff --git a/textures/icons/heart_fill.png.import b/textures/icons/heart_fill.png.import
index 0d862d5..7cc8bc8 100644
--- a/textures/icons/heart_fill.png.import
+++ b/textures/icons/heart_fill.png.import
@@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
-flags/filter=true
+flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
diff --git a/textures/icons/heart_fill.xcf b/textures/icons/heart_fill.xcf
index 1e2d32c..3b3b6cf 100644
--- a/textures/icons/heart_fill.xcf
+++ b/textures/icons/heart_fill.xcf
Binary files differ