diff --git a/enemies/ghost animation/Ghost 1.png.import b/enemies/ghost animation/Ghost 1.png.import index b1d0f88..305b740 100644 --- a/enemies/ghost animation/Ghost 1.png.import +++ b/enemies/ghost animation/Ghost 1.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 1.png-43131954ed622829dc5453ddf6a96b4c. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 2.png.import b/enemies/ghost animation/Ghost 2.png.import index 87f2b9b..4ee80ea 100644 --- a/enemies/ghost animation/Ghost 2.png.import +++ b/enemies/ghost animation/Ghost 2.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 2.png-67077adaa01a71a5c0b85fac254bdf8e. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 3.png.import b/enemies/ghost animation/Ghost 3.png.import index 5d4f743..932de75 100644 --- a/enemies/ghost animation/Ghost 3.png.import +++ b/enemies/ghost animation/Ghost 3.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 3.png-18da238556f83c92715d2db31a14d159. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 4.png.import b/enemies/ghost animation/Ghost 4.png.import index 1ac4e37..8c6d724 100644 --- a/enemies/ghost animation/Ghost 4.png.import +++ b/enemies/ghost animation/Ghost 4.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 4.png-45ba6df3ef207a5eff72f5f0036139d6. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/enemies/ghost animation/Ghost 5.png.import b/enemies/ghost animation/Ghost 5.png.import index c47e6e7..98ac10c 100644 --- a/enemies/ghost animation/Ghost 5.png.import +++ b/enemies/ghost animation/Ghost 5.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 5.png-08f0125e59cfd0173a5d36d75efeae60. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/healthbar/heart.tscn b/healthbar/heart.tscn index d9a9764..367314b 100644 --- a/healthbar/heart.tscn +++ b/healthbar/heart.tscn @@ -1,16 +1,20 @@ -[gd_scene load_steps=3 format=3 uid="uid://em0xambhywfv"] +[gd_scene load_steps=4 format=3 uid="uid://em0xambhywfv"] [ext_resource type="Script" uid="uid://c60wm212fu1ti" path="res://healthbar/heart.gd" id="1_c17c5"] -[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="1_kepki"] +[ext_resource type="Texture2D" uid="uid://djfc7sdc8wxp6" path="res://player/Heart_cut.png" id="2_885dn"] +[ext_resource type="Texture2D" uid="uid://ctwu08w867gax" path="res://player/Heart_cut Grey.png" id="3_4yb2p"] [node name="Heart" type="MarginContainer"] +offset_right = 64.0 +offset_bottom = 64.0 script = ExtResource("1_c17c5") [node name="UP" type="TextureRect" parent="."] layout_mode = 2 -texture = ExtResource("1_kepki") +texture = ExtResource("2_885dn") +expand_mode = 3 [node name="DOWN" type="TextureRect" parent="."] -modulate = Color(0.03137255, 0.21568628, 0.28627452, 1) layout_mode = 2 -texture = ExtResource("1_kepki") +texture = ExtResource("3_4yb2p") +expand_mode = 3 diff --git a/items/item.gd b/items/item.gd index befe8ab..43e8541 100644 --- a/items/item.gd +++ b/items/item.gd @@ -1,11 +1,8 @@ class_name Item extends Area2D @onready var player = get_tree().get_root().get_node("main/Player") -func _ready() -> void: - self.connect("body_entered", _on_body_entered) - -func _on_body_entered(body: Node2D): - if(body.name == "Player"): +func _physics_process(delta: float) -> void: + if(overlaps_body(player)): if(self.has_method("collect") and collect()): set_deferred("monitoring", false) set_deferred("monitorable", false) diff --git a/main.tscn b/main.tscn index ad64fb3..d160a2d 100644 --- a/main.tscn +++ b/main.tscn @@ -39,8 +39,8 @@ autostart = true [node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="Healthbar" parent="CanvasLayer" instance=ExtResource("6_7mycd")] -offset_right = 128.0 -offset_bottom = 128.0 +offset_right = 96.0 +offset_bottom = 96.0 [node name="ItemUI" parent="CanvasLayer" node_paths=PackedStringArray("player") instance=ExtResource("6_4c57u")] player = NodePath("../../Player") diff --git a/player/Heart Grey.png b/player/Heart Grey.png new file mode 100644 index 0000000..4aabcc0 Binary files /dev/null and b/player/Heart Grey.png differ diff --git a/player/Heart Grey.png.import b/player/Heart Grey.png.import new file mode 100644 index 0000000..4683b68 --- /dev/null +++ b/player/Heart Grey.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://chsx3yjgb33md" +path="res://.godot/imported/Heart Grey.png-6b86b8edc4802c3a483d9a14eb7ce196.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Heart Grey.png" +dest_files=["res://.godot/imported/Heart Grey.png-6b86b8edc4802c3a483d9a14eb7ce196.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/player/Heart.png b/player/Heart.png new file mode 100644 index 0000000..a0e742a Binary files /dev/null and b/player/Heart.png differ diff --git a/player/Heart.png.import b/player/Heart.png.import new file mode 100644 index 0000000..38455ee --- /dev/null +++ b/player/Heart.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d4j1esxewsots" +path="res://.godot/imported/Heart.png-33902e9ff8206d83f93ea6d088b4a1bc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Heart.png" +dest_files=["res://.godot/imported/Heart.png-33902e9ff8206d83f93ea6d088b4a1bc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/player/Heart_cut Grey.png b/player/Heart_cut Grey.png new file mode 100644 index 0000000..6994861 Binary files /dev/null and b/player/Heart_cut Grey.png differ diff --git a/player/Heart_cut Grey.png.import b/player/Heart_cut Grey.png.import new file mode 100644 index 0000000..31c6ef0 --- /dev/null +++ b/player/Heart_cut Grey.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctwu08w867gax" +path="res://.godot/imported/Heart_cut Grey.png-b4b9be15b5a8a36395d31eba43aa5a0c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Heart_cut Grey.png" +dest_files=["res://.godot/imported/Heart_cut Grey.png-b4b9be15b5a8a36395d31eba43aa5a0c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/player/Heart_cut.png b/player/Heart_cut.png new file mode 100644 index 0000000..3da9245 Binary files /dev/null and b/player/Heart_cut.png differ diff --git a/player/Heart_cut.png.import b/player/Heart_cut.png.import new file mode 100644 index 0000000..1646dfd --- /dev/null +++ b/player/Heart_cut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://djfc7sdc8wxp6" +path="res://.godot/imported/Heart_cut.png-f11ef12fc6c55a0077b5ba659ce17adf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/Heart_cut.png" +dest_files=["res://.godot/imported/Heart_cut.png-f11ef12fc6c55a0077b5ba659ce17adf.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/world/Background Prototype/Background Prototype Layer 1.png.import b/world/Background Prototype/Background Prototype Layer 1.png.import index 2b3265d..3291c4a 100644 --- a/world/Background Prototype/Background Prototype Layer 1.png.import +++ b/world/Background Prototype/Background Prototype Layer 1.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 1.png-47bb54b6d20a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 2.png.import b/world/Background Prototype/Background Prototype Layer 2.png.import index f18ed3b..7415d89 100644 --- a/world/Background Prototype/Background Prototype Layer 2.png.import +++ b/world/Background Prototype/Background Prototype Layer 2.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 2.png-ab86220f0fff compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 3.png.import b/world/Background Prototype/Background Prototype Layer 3.png.import index 816fbed..7399a52 100644 --- a/world/Background Prototype/Background Prototype Layer 3.png.import +++ b/world/Background Prototype/Background Prototype Layer 3.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 3.png-5a49ea16a5dc compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background Prototype/Background Prototype Layer 4.png.import b/world/Background Prototype/Background Prototype Layer 4.png.import index b465008..6ff53ad 100644 --- a/world/Background Prototype/Background Prototype Layer 4.png.import +++ b/world/Background Prototype/Background Prototype Layer 4.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 4.png-ee5791549e67 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/world/Background prototype.png.import b/world/Background prototype.png.import index e719aee..c64e0d8 100644 --- a/world/Background prototype.png.import +++ b/world/Background prototype.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background prototype.png-82410769bb8789c49aff compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false