diff --git a/project.godot b/project.godot index e6c3459..1ec1a46 100644 --- a/project.godot +++ b/project.godot @@ -29,7 +29,6 @@ project/assembly_name="code-game-jam-drop-plafond-2025" World_Border="" Enemies="" -Player="" [input] diff --git a/ressources/images/empty_slot.svg b/ressources/images/empty_slot.svg deleted file mode 100644 index 147448b..0000000 --- a/ressources/images/empty_slot.svg +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ressources/images/empty_slot.svg.import b/ressources/images/empty_slot.svg.import deleted file mode 100644 index e5ae581..0000000 --- a/ressources/images/empty_slot.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cy7cv4qcmyyol" -path="res://.godot/imported/empty_slot.svg-965915fedb9a029d1613b3da0b6be686.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/empty_slot.svg" -dest_files=["res://.godot/imported/empty_slot.svg-965915fedb9a029d1613b3da0b6be686.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 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false diff --git a/ressources/images/full_heart.svg b/ressources/images/full_heart.svg deleted file mode 100644 index 4d34171..0000000 --- a/ressources/images/full_heart.svg +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ressources/images/full_heart.svg.import b/ressources/images/full_heart.svg.import deleted file mode 100644 index e656293..0000000 --- a/ressources/images/full_heart.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://jyrl33rv1fnp" -path="res://.godot/imported/full_heart.svg-e5444af8ba77218c264db7c73bc41e09.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/full_heart.svg" -dest_files=["res://.godot/imported/full_heart.svg-e5444af8ba77218c264db7c73bc41e09.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 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false diff --git a/ressources/images/half_heart.svg b/ressources/images/half_heart.svg deleted file mode 100644 index f0b34aa..0000000 --- a/ressources/images/half_heart.svg +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ressources/images/half_heart.svg.import b/ressources/images/half_heart.svg.import deleted file mode 100644 index e561b61..0000000 --- a/ressources/images/half_heart.svg.import +++ /dev/null @@ -1,37 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://blwxdgwmf60om" -path="res://.godot/imported/half_heart.svg-8874d5a3650dac8caf48118693ab0ab7.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/half_heart.svg" -dest_files=["res://.godot/imported/half_heart.svg-8874d5a3650dac8caf48118693ab0ab7.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 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false diff --git a/ressources/images/roby-atk-0.png b/ressources/images/roby-atk-0.png deleted file mode 100644 index dbf56b7..0000000 Binary files a/ressources/images/roby-atk-0.png and /dev/null differ diff --git a/ressources/images/roby-atk-0.png.import b/ressources/images/roby-atk-0.png.import deleted file mode 100644 index 1a6231e..0000000 --- a/ressources/images/roby-atk-0.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://duto5skmjixh6" -path="res://.godot/imported/roby-atk-0.png-0c25866751763526a4c24d51d3257715.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-atk-0.png" -dest_files=["res://.godot/imported/roby-atk-0.png-0c25866751763526a4c24d51d3257715.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/ressources/images/roby-atk-1.png b/ressources/images/roby-atk-1.png deleted file mode 100644 index 581d449..0000000 Binary files a/ressources/images/roby-atk-1.png and /dev/null differ diff --git a/ressources/images/roby-atk-1.png.import b/ressources/images/roby-atk-1.png.import deleted file mode 100644 index dfcff86..0000000 --- a/ressources/images/roby-atk-1.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://8xhcmbkyxlwb" -path="res://.godot/imported/roby-atk-1.png-092e4aa70610e9583dc74aacb0caaada.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-atk-1.png" -dest_files=["res://.godot/imported/roby-atk-1.png-092e4aa70610e9583dc74aacb0caaada.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/ressources/images/roby-atk-2.png b/ressources/images/roby-atk-2.png deleted file mode 100644 index a36c3e9..0000000 Binary files a/ressources/images/roby-atk-2.png and /dev/null differ diff --git a/ressources/images/roby-atk-2.png.import b/ressources/images/roby-atk-2.png.import deleted file mode 100644 index 144c55b..0000000 --- a/ressources/images/roby-atk-2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://br8d144g0u2le" -path="res://.godot/imported/roby-atk-2.png-ca68db4879029c3a0bab292c58ee11b3.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-atk-2.png" -dest_files=["res://.godot/imported/roby-atk-2.png-ca68db4879029c3a0bab292c58ee11b3.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/ressources/images/roby-atk-3.png b/ressources/images/roby-atk-3.png deleted file mode 100644 index c075d7a..0000000 Binary files a/ressources/images/roby-atk-3.png and /dev/null differ diff --git a/ressources/images/roby-atk-3.png.import b/ressources/images/roby-atk-3.png.import deleted file mode 100644 index fbdea90..0000000 --- a/ressources/images/roby-atk-3.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cxvxfwv2nii64" -path="res://.godot/imported/roby-atk-3.png-5bbdf74e8fe86ba4f85f10be1d1c26b4.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-atk-3.png" -dest_files=["res://.godot/imported/roby-atk-3.png-5bbdf74e8fe86ba4f85f10be1d1c26b4.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/ressources/images/roby-cercle.png b/ressources/images/roby-cercle.png deleted file mode 100644 index 74a4829..0000000 Binary files a/ressources/images/roby-cercle.png and /dev/null differ diff --git a/ressources/images/roby-cercle.png.import b/ressources/images/roby-cercle.png.import deleted file mode 100644 index fc91a8d..0000000 --- a/ressources/images/roby-cercle.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b5ui24x0341jh" -path="res://.godot/imported/roby-cercle.png-2b57287ddf3ce659baa9538c58a7b0db.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-cercle.png" -dest_files=["res://.godot/imported/roby-cercle.png-2b57287ddf3ce659baa9538c58a7b0db.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/ressources/images/roby-idle-0.png b/ressources/images/roby-idle-0.png deleted file mode 100644 index b92e358..0000000 Binary files a/ressources/images/roby-idle-0.png and /dev/null differ diff --git a/ressources/images/roby-idle-0.png.import b/ressources/images/roby-idle-0.png.import deleted file mode 100644 index 37375a7..0000000 --- a/ressources/images/roby-idle-0.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dwwe0eanmrcra" -path="res://.godot/imported/roby-idle-0.png-32e2a55f98f7e8894274c97fca13f519.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-idle-0.png" -dest_files=["res://.godot/imported/roby-idle-0.png-32e2a55f98f7e8894274c97fca13f519.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/ressources/images/roby-idle-1.png b/ressources/images/roby-idle-1.png deleted file mode 100644 index 86c21da..0000000 Binary files a/ressources/images/roby-idle-1.png and /dev/null differ diff --git a/ressources/images/roby-idle-1.png.import b/ressources/images/roby-idle-1.png.import deleted file mode 100644 index 0d03f7e..0000000 --- a/ressources/images/roby-idle-1.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://8m84oe4oes3u" -path="res://.godot/imported/roby-idle-1.png-d8e741b1bee595933bfbe8feed4412aa.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-idle-1.png" -dest_files=["res://.godot/imported/roby-idle-1.png-d8e741b1bee595933bfbe8feed4412aa.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/ressources/images/roby-idle-2.png b/ressources/images/roby-idle-2.png deleted file mode 100644 index b89b644..0000000 Binary files a/ressources/images/roby-idle-2.png and /dev/null differ diff --git a/ressources/images/roby-idle-2.png.import b/ressources/images/roby-idle-2.png.import deleted file mode 100644 index f6a693b..0000000 --- a/ressources/images/roby-idle-2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dcyf6teijpttj" -path="res://.godot/imported/roby-idle-2.png-0b5f86ac9b96ec21cba060b3c0c85046.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://ressources/images/roby-idle-2.png" -dest_files=["res://.godot/imported/roby-idle-2.png-0b5f86ac9b96ec21cba060b3c0c85046.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/scenes/Room.tscn b/scenes/Room.tscn index 429abfb..b9011dc 100644 --- a/scenes/Room.tscn +++ b/scenes/Room.tscn @@ -1,14 +1,12 @@ -[gd_scene load_steps=14 format=3 uid="uid://durhes43gex7a"] +[gd_scene load_steps=12 format=3 uid="uid://durhes43gex7a"] [ext_resource type="PackedScene" uid="uid://c7bfiw54rvaq2" path="res://scenes/player_melodie.tscn" id="1_cl1wt"] [ext_resource type="Script" path="res://scenes/room.gd" id="1_jh83c"] -[ext_resource type="AudioStream" uid="uid://qyacm71epyhi" path="res://ressources/sons/idle_theme.wav" id="2_8nbnd"] [ext_resource type="Texture2D" uid="uid://ky4e7158gqf6" path="res://ressources/images/cgj_default_tile.svg" id="2_torsx"] [ext_resource type="PackedScene" uid="uid://cyvqa6g64cw37" path="res://scenes/enemies/slime.tscn" id="3_04ip2"] [ext_resource type="Texture2D" uid="uid://bge3nllk1bq5r" path="res://ressources/images/mur.svg" id="3_oi2tl"] [ext_resource type="Texture2D" uid="uid://dhva3tivsvknl" path="res://ressources/images/mur_coin.svg" id="4_6a3f6"] [ext_resource type="PackedScene" uid="uid://di4chlep1t1or" path="res://parametres/menu_parametres.tscn" id="6_6ubhx"] -[ext_resource type="PackedScene" uid="uid://cnd2a1x1smulq" path="res://scenes/interface.tscn" id="8_5s7tf"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_1c4te"] normal = Vector2(0, 1) @@ -28,12 +26,6 @@ distance = -596.0 [node name="Room" type="Node2D"] script = ExtResource("1_jh83c") -[node name="Musique" type="AudioStreamPlayer" parent="."] -process_mode = 3 -stream = ExtResource("2_8nbnd") -autoplay = true -bus = &"Music" - [node name="TextureRect" type="TextureRect" parent="."] offset_left = -638.0 offset_top = -360.0 @@ -141,11 +133,3 @@ offset_left = -640.0 offset_top = -360.0 offset_right = 640.0 offset_bottom = 360.0 - -[node name="Interface" parent="." instance=ExtResource("8_5s7tf")] -offset_left = -640.0 -offset_top = -360.0 -offset_right = -640.0 -offset_bottom = -360.0 - -[connection signal="finished" from="Musique" to="." method="_on_audio_stream_player_finished"] diff --git a/scenes/attaques/Balle.tscn b/scenes/attaques/Balle.tscn index c40810f..919db87 100644 --- a/scenes/attaques/Balle.tscn +++ b/scenes/attaques/Balle.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=4 format=3 uid="uid://btpp8l4efhrmj"] +[gd_scene load_steps=4 format=3 uid="uid://buhlaoq2nalup"] [ext_resource type="Script" path="res://scripts/Instrument/balle.gd" id="1_4kd3w"] [ext_resource type="Texture2D" uid="uid://csbrejwjfkspr" path="res://ressources/images/note1.png" id="1_qx664"] diff --git a/scenes/attaques/Onde.tscn b/scenes/attaques/Onde.tscn deleted file mode 100644 index 9eb3b19..0000000 --- a/scenes/attaques/Onde.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://bcypcnpu0608o"] - -[ext_resource type="Script" path="res://scripts/Instrument/onde.gd" id="1_6377h"] -[ext_resource type="Texture2D" uid="uid://cb5xpbtagu6jv" path="res://ressources/images/ronde tambour.png.png" id="1_oawub"] - -[sub_resource type="CircleShape2D" id="CircleShape2D_r81ru"] -radius = 125.575 - -[node name="Onde" type="CharacterBody2D"] -collision_layer = 2 -collision_mask = 2 -script = ExtResource("1_6377h") - -[node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(2.5, 2.5) -texture = ExtResource("1_oawub") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_r81ru") diff --git a/scenes/enemies/poulpe.gd b/scenes/enemies/poulpe.gd deleted file mode 100644 index c560819..0000000 --- a/scenes/enemies/poulpe.gd +++ /dev/null @@ -1,48 +0,0 @@ -extends CharacterBody2D - -const SPEED = 50.0 -@onready var player = get_parent().get_node("Player_Melodie") -var player_position = Vector2.ZERO -var target_position = Vector2.ZERO - -var move_timer = 1 - -var vie = 3 -var balle = null -var Balle = null - -func _ready() -> void: - Balle = load("res://scenes/enemies/poulpeBullet.tscn") - - -func take_damage(dmg : int) : - vie -= dmg - if vie <= 0: - queue_free() - - -func _physics_process(delta: float) -> void: - player_position = player.position - target_position = (player_position - position).normalized() - move_and_slide() - - -func _process(delta: float) -> void: - var direction : Vector2 - move_timer -= delta - - if move_timer < 0: - attaquer_joueur() - move_timer = 1 - - - $AnimatedSprite2D.play("Generic") - - velocity = target_position * SPEED * -1 - - -func attaquer_joueur() -> void: - balle = Balle.instantiate() - balle.set_direction(target_position) - balle.position = position - get_parent().add_child(balle) diff --git a/scenes/enemies/poulpe.tscn b/scenes/enemies/poulpe.tscn deleted file mode 100644 index 4c746c7..0000000 --- a/scenes/enemies/poulpe.tscn +++ /dev/null @@ -1,33 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://voiqrkjd02om"] - -[ext_resource type="Script" path="res://scenes/enemies/poulpe.gd" id="1_hu6wh"] -[ext_resource type="Texture2D" uid="uid://2spn60rmdyy5" path="res://ressources/images/poulpe-1.png" id="1_lgwa7"] -[ext_resource type="Texture2D" uid="uid://b4ukmsspx16f" path="res://ressources/images/poulpe-2.png" id="2_5x4i5"] - -[sub_resource type="SpriteFrames" id="SpriteFrames_2hq77"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_lgwa7") -}, { -"duration": 1.0, -"texture": ExtResource("2_5x4i5") -}], -"loop": true, -"name": &"Generic", -"speed": 5.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_s7foh"] -radius = 38.2753 - -[node name="Poulpe" type="CharacterBody2D"] -script = ExtResource("1_hu6wh") - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -scale = Vector2(0.4, 0.4) -sprite_frames = SubResource("SpriteFrames_2hq77") -animation = &"Generic" - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_s7foh") diff --git a/scenes/enemies/poulpeBullet.tscn b/scenes/enemies/poulpeBullet.tscn deleted file mode 100644 index c34e260..0000000 --- a/scenes/enemies/poulpeBullet.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://gytt3e3u0pid"] - -[ext_resource type="Script" path="res://scenes/enemies/poulpe_bullet.gd" id="1_qycm8"] -[ext_resource type="Texture2D" uid="uid://bg7xknf5g2rfj" path="res://ressources/images/poulpe-bullet.png" id="2_o0wmh"] - -[node name="PoulpeBullet" type="Area2D"] -script = ExtResource("1_qycm8") - -[node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(0.35, 0.35) -texture = ExtResource("2_o0wmh") - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] -scale = Vector2(0.35, 0.35) -polygon = PackedVector2Array(-42, -44, -42, 43.2, -39.9, 44.3, -36.4, 42, -34.3, 42, -28, 6.2, -28, -1.4, -18, 7.89999, -18, 9.2, 23.5, 32, 28.8, 32, 32, 28.8, 32, 25.5, 18, 0.5, 18, -2.9, -6.8, -26.6, 19.4, -32, 32.4, -32, 41.4, -36, 43.2, -36, 44.3, -38.1, 42, -41.7, 42, -44) - -[connection signal="body_entered" from="." to="." method="Collision"] diff --git a/scenes/enemies/poulpe_bullet.gd b/scenes/enemies/poulpe_bullet.gd deleted file mode 100644 index 434c459..0000000 --- a/scenes/enemies/poulpe_bullet.gd +++ /dev/null @@ -1,20 +0,0 @@ -extends Area2D - -var speed = 200.0 -var direction = Vector2.ZERO - -func _process(delta: float) -> void: - position += direction * speed * delta - -func set_direction(direction: Vector2) -> void: - self.direction = direction - - -func Collision(body: Node2D) -> void: - if body.is_in_group("World_Border") : - queue_free() - if body.is_in_group("Player"): - body.take_damage(3) - queue_free() - - diff --git a/scenes/enemies/sli2D1.tmp b/scenes/enemies/sli2D1.tmp deleted file mode 100644 index a33edd0..0000000 --- a/scenes/enemies/sli2D1.tmp +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://cyvqa6g64cw37"] - -[ext_resource type="Script" path="res://scenes/enemies/slime.gd" id="1_hnufy"] -[ext_resource type="Texture2D" uid="uid://c85d5krtd4nks" path="res://ressources/images/blob-1.png" id="2_f4wf2"] -[ext_resource type="Texture2D" uid="uid://c0b6d7551nbcm" path="res://ressources/images/blob-2-4.png" id="3_dyq42"] - -[sub_resource type="SpriteFrames" id="SpriteFrames_qfla8"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_f4wf2") -}, { -"duration": 1.0, -"texture": ExtResource("3_dyq42") -}], -"loop": false, -"name": &"Generic", -"speed": 3.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"] -radius = 20.0 - -[node name="Slime" type="CharacterBody2D"] -collision_layer = 3 -collision_mask = 3 -script = ExtResource("1_hnufy") - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -scale = Vector2(0.2, 0.2) -sprite_frames = SubResource("SpriteFrames_qfla8") -animation = &"Generic" - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_bokrm") diff --git a/scenes/enemies/sli97B9.tmp b/scenes/enemies/sli97B9.tmp deleted file mode 100644 index a33edd0..0000000 --- a/scenes/enemies/sli97B9.tmp +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://cyvqa6g64cw37"] - -[ext_resource type="Script" path="res://scenes/enemies/slime.gd" id="1_hnufy"] -[ext_resource type="Texture2D" uid="uid://c85d5krtd4nks" path="res://ressources/images/blob-1.png" id="2_f4wf2"] -[ext_resource type="Texture2D" uid="uid://c0b6d7551nbcm" path="res://ressources/images/blob-2-4.png" id="3_dyq42"] - -[sub_resource type="SpriteFrames" id="SpriteFrames_qfla8"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_f4wf2") -}, { -"duration": 1.0, -"texture": ExtResource("3_dyq42") -}], -"loop": false, -"name": &"Generic", -"speed": 3.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"] -radius = 20.0 - -[node name="Slime" type="CharacterBody2D"] -collision_layer = 3 -collision_mask = 3 -script = ExtResource("1_hnufy") - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -scale = Vector2(0.2, 0.2) -sprite_frames = SubResource("SpriteFrames_qfla8") -animation = &"Generic" - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_bokrm") diff --git a/scenes/enemies/sliA92E.tmp b/scenes/enemies/sliA92E.tmp deleted file mode 100644 index a33edd0..0000000 --- a/scenes/enemies/sliA92E.tmp +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://cyvqa6g64cw37"] - -[ext_resource type="Script" path="res://scenes/enemies/slime.gd" id="1_hnufy"] -[ext_resource type="Texture2D" uid="uid://c85d5krtd4nks" path="res://ressources/images/blob-1.png" id="2_f4wf2"] -[ext_resource type="Texture2D" uid="uid://c0b6d7551nbcm" path="res://ressources/images/blob-2-4.png" id="3_dyq42"] - -[sub_resource type="SpriteFrames" id="SpriteFrames_qfla8"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_f4wf2") -}, { -"duration": 1.0, -"texture": ExtResource("3_dyq42") -}], -"loop": false, -"name": &"Generic", -"speed": 3.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"] -radius = 20.0 - -[node name="Slime" type="CharacterBody2D"] -collision_layer = 3 -collision_mask = 3 -script = ExtResource("1_hnufy") - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -scale = Vector2(0.2, 0.2) -sprite_frames = SubResource("SpriteFrames_qfla8") -animation = &"Generic" - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_bokrm") diff --git a/scenes/enemies/sliDD95.tmp b/scenes/enemies/sliDD95.tmp deleted file mode 100644 index a33edd0..0000000 --- a/scenes/enemies/sliDD95.tmp +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://cyvqa6g64cw37"] - -[ext_resource type="Script" path="res://scenes/enemies/slime.gd" id="1_hnufy"] -[ext_resource type="Texture2D" uid="uid://c85d5krtd4nks" path="res://ressources/images/blob-1.png" id="2_f4wf2"] -[ext_resource type="Texture2D" uid="uid://c0b6d7551nbcm" path="res://ressources/images/blob-2-4.png" id="3_dyq42"] - -[sub_resource type="SpriteFrames" id="SpriteFrames_qfla8"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("2_f4wf2") -}, { -"duration": 1.0, -"texture": ExtResource("3_dyq42") -}], -"loop": false, -"name": &"Generic", -"speed": 3.0 -}] - -[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"] -radius = 20.0 - -[node name="Slime" type="CharacterBody2D"] -collision_layer = 3 -collision_mask = 3 -script = ExtResource("1_hnufy") - -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] -scale = Vector2(0.2, 0.2) -sprite_frames = SubResource("SpriteFrames_qfla8") -animation = &"Generic" - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_bokrm") diff --git a/scenes/enemies/slime.gd b/scenes/enemies/slime.gd index b4c1679..df33253 100644 --- a/scenes/enemies/slime.gd +++ b/scenes/enemies/slime.gd @@ -7,29 +7,14 @@ var player_position = Vector2.ZERO var target_position = Vector2.ZERO var move_timer = 2 -var next_degat = 1 - -var vie = 4 -func take_damage(dmg : int) : - vie -= dmg - if vie <= 0: - queue_free() - func _physics_process(delta: float) -> void: player_position = player.position target_position = (player_position - position).normalized() move_and_slide() - next_degat -= delta - for i in get_slide_collision_count(): var collision = get_slide_collision(i) - if collision.get_collider_shape().get_instance_id() == player.get_child(1).get_instance_id(): - if next_degat <= 0: - player.take_damage(2) - next_degat = 1 - func _process(delta: float) -> void: var direction : Vector2 @@ -42,9 +27,3 @@ func _process(delta: float) -> void: $AnimatedSprite2D.play("Generic") velocity = direction * SPEED - - -func Collision(body: Node2D) -> void: - print(body) - if body.is_in_group("Player") : - body.take_damage(1) diff --git a/scenes/enemies/slime.tscn b/scenes/enemies/slime.tscn index d690b49..a33edd0 100644 --- a/scenes/enemies/slime.tscn +++ b/scenes/enemies/slime.tscn @@ -22,8 +22,8 @@ animations = [{ radius = 20.0 [node name="Slime" type="CharacterBody2D"] -collision_layer = 6 -collision_mask = 6 +collision_layer = 3 +collision_mask = 3 script = ExtResource("1_hnufy") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] diff --git a/scenes/interface.gd b/scenes/interface.gd deleted file mode 100644 index 7f623f1..0000000 --- a/scenes/interface.gd +++ /dev/null @@ -1,91 +0,0 @@ -extends Control - -@onready var coeur1 = $VBoxContainer/HBoxContainer/TextureRect1 -@onready var coeur2 = $VBoxContainer/HBoxContainer/TextureRect2 -@onready var coeur3 = $VBoxContainer/HBoxContainer/TextureRect3 -@onready var coeur4 = $VBoxContainer/HBoxContainer/TextureRect4 -@onready var coeur5 = $VBoxContainer/HBoxContainer/TextureRect5 -#Les coeurs, 1 étant le plus à gauche et 5 le plus à droite - -@onready var slot1 = $VBoxContainer/HBoxContainer2/TextureRect -@onready var slot2 = $VBoxContainer/HBoxContainer2/TextureRect2 - -@onready var life : int = 10 - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - pass - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta: float) -> void: - pass - -func set_life(pv : int) -> void : - for i in range(life, pv): - update_life(i) - update_life(pv) - -func update_life (pv : int) -> void : - match pv : - 0 : - coeur1.hide() - #Rajouter ici la gestion de la mort - 1 : - coeur1.texture = load("res://ressources/images/half_heart.svg") - 2 : - coeur1.texture = load("res://ressources/images/full_heart.svg") - coeur2.hide() - 3 : - coeur2.texture = load("res://ressources/images/half_heart.svg") - coeur2.show() - 4 : - coeur2.texture = load("res://ressources/images/full_heart.svg") - coeur3.hide() - 5 : - coeur3.texture = load("res://ressources/images/half_heart.svg") - coeur3.show() - 6 : - coeur3.texture = load("res://ressources/images/full_heart.svg") - coeur4.hide() - 7 : - coeur4.texture = load("res://ressources/images/half_heart.svg") - coeur4.show() - 8 : - coeur4.texture = load("res://ressources/images/full_heart.svg") - coeur5.hide() - 9 : - coeur5.texture = load("res://ressources/images/half_heart.svg") - coeur5.show() - 10 : - coeur5.texture = load("res://ressources/images/full_heart.svg") - _ : - return - - life = pv - - -func update_instrument (listeInstrument : Array) -> void : - if len(listeInstrument) < 2 : - slot1.texture = load("res://ressources/images/empty_slot.svg") - slot2.texture = load("res://ressources/images/empty_slot.svg") - - match listeInstrument[0] : - "flute" : - slot1.texture = load("res://ressources/images/flute.svg") - "tambour" : - slot1.texture = load("res://ressources/images/tambour.svg") - "lyre" : - slot1.texture = load("res://ressources/images/lyre.svg") - _ : - slot1.texture = load("res://ressources/images/empty_slot.svg") - - match listeInstrument[1] : - "flute" : - slot2.texture = load("res://ressources/images/flute.svg") - "tambour" : - slot2.texture = load("res://ressources/images/tambour.svg") - "lyre" : - slot2.texture = load("res://ressources/images/lyre.svg") - _ : - slot2.texture = load("res://ressources/images/empty_slot.svg") diff --git a/scenes/interface.tscn b/scenes/interface.tscn deleted file mode 100644 index d24e6ae..0000000 --- a/scenes/interface.tscn +++ /dev/null @@ -1,99 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://cnd2a1x1smulq"] - -[ext_resource type="Script" path="res://scenes/interface.gd" id="1_5p24o"] -[ext_resource type="Texture2D" uid="uid://jyrl33rv1fnp" path="res://ressources/images/full_heart.svg" id="2_opn3r"] -[ext_resource type="Texture2D" uid="uid://cy7cv4qcmyyol" path="res://ressources/images/empty_slot.svg" id="3_8aruj"] - -[node name="Control" type="Control"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -script = ExtResource("1_5p24o") - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 0 -offset_right = 1280.0 -offset_bottom = 720.0 - -[node name="HSeparator2" type="HSeparator" parent="VBoxContainer"] -modulate = Color(1, 1, 1, 0) -self_modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(0, 12) -layout_mode = 2 - -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] -layout_mode = 2 - -[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer"] -modulate = Color(1, 1, 1, 0) -self_modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(32, 0) -layout_mode = 2 - -[node name="TextureRect1" type="TextureRect" parent="VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("2_opn3r") -expand_mode = 1 - -[node name="TextureRect2" type="TextureRect" parent="VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("2_opn3r") -expand_mode = 1 - -[node name="TextureRect3" type="TextureRect" parent="VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("2_opn3r") -expand_mode = 1 - -[node name="TextureRect4" type="TextureRect" parent="VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("2_opn3r") -expand_mode = 1 - -[node name="TextureRect5" type="TextureRect" parent="VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("2_opn3r") -expand_mode = 1 - -[node name="HSeparator" type="HSeparator" parent="VBoxContainer"] -modulate = Color(1, 1, 1, 0) -self_modulate = Color(1, 1, 1, 0) -layout_mode = 2 -size_flags_vertical = 3 - -[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"] -layout_mode = 2 - -[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer2"] -modulate = Color(1, 1, 1, 0) -self_modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(32, 0) -layout_mode = 2 - -[node name="TextureRect" type="TextureRect" parent="VBoxContainer/HBoxContainer2"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("3_8aruj") -expand_mode = 1 - -[node name="TextureRect2" type="TextureRect" parent="VBoxContainer/HBoxContainer2"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -texture = ExtResource("3_8aruj") -expand_mode = 1 - -[node name="HSeparator3" type="HSeparator" parent="VBoxContainer"] -modulate = Color(1, 1, 1, 0) -self_modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(0, 12) -layout_mode = 2 diff --git a/scenes/player_melodie.tscn b/scenes/player_melodie.tscn index 39b5e2a..7cc90e9 100644 --- a/scenes/player_melodie.tscn +++ b/scenes/player_melodie.tscn @@ -8,7 +8,6 @@ radius = 6.0 height = 32.0 [node name="Player_Melodie" type="CharacterBody2D"] -collision_layer = 5 script = ExtResource("1_7sg4g") [node name="Sprite2D" type="Sprite2D" parent="."] diff --git a/scenes/room.gd b/scenes/room.gd index 4b0719a..5fbafdf 100644 --- a/scenes/room.gd +++ b/scenes/room.gd @@ -1,8 +1,6 @@ extends Node2D @onready var menu_parametres = $Menu_parametres -@onready var interface = $Interface -@onready var musique = $Musique # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -24,16 +22,3 @@ func on_exit_parametres() -> void : get_tree().paused = false menu_parametres.visible = false menu_parametres.set_process(false) - - -func _on_audio_stream_player_finished() -> void: - musique.play() - -func set_musique(nom : String) -> void : - match nom : - "idle" : - musique.stream = load("res://ressources/sons/idle_theme.wav") - "fight" : - musique.stream = load("res://ressources/sons/fight_theme.wav") - _ : - pass diff --git a/scripts/Instrument/balle.gd b/scripts/Instrument/balle.gd index 6209e30..f01c97b 100644 --- a/scripts/Instrument/balle.gd +++ b/scripts/Instrument/balle.gd @@ -13,6 +13,4 @@ func Collision(body: Node2D) -> void: if body.is_in_group("World_Border") : queue_free() if body.is_in_group("Enemies") : - body.take_damage(1) - print(body.vie) queue_free() diff --git a/scripts/Instrument/fusil_pompe.gd b/scripts/Instrument/fusil_pompe.gd index c5d9f06..4e5abfc 100644 --- a/scripts/Instrument/fusil_pompe.gd +++ b/scripts/Instrument/fusil_pompe.gd @@ -1,7 +1,7 @@ extends Area2D var timer = 0.0 -var cooldown = 0.3 +var cooldown = 0.35 func _process(delta: float) -> void: timer += delta @@ -9,5 +9,6 @@ func _process(delta: float) -> void: queue_free() func Collision(body: Node2D) -> void: + if body.is_in_group("Enemies") : - body.take_damage(3) + queue_free() diff --git a/scripts/Instrument/onde.gd b/scripts/Instrument/onde.gd index 78b8915..460800b 100644 --- a/scripts/Instrument/onde.gd +++ b/scripts/Instrument/onde.gd @@ -1,7 +1,7 @@ extends Area2D var timer = 0.0 -var cooldown = 0.33 +var cooldown = 1.5 func _process(delta: float) -> void: timer += delta @@ -11,4 +11,4 @@ func _process(delta: float) -> void: func Collision(body: Node2D) -> void: if body.is_in_group("Enemies") : - body.take_damage(2) + queue_free() diff --git a/scripts/player_control.gd b/scripts/player_control.gd index 788e03a..584c819 100644 --- a/scripts/player_control.gd +++ b/scripts/player_control.gd @@ -21,8 +21,6 @@ var lyre_cooldown = 1 var slot = [null, null] -var vie = 10 - func _ready() -> void: flute = load("res://scripts/Instrument/Flute.gd").new() flute.set_scene_parent(get_tree().get_root()) @@ -101,8 +99,3 @@ func _process(delta: float) -> void: lyre_timer = lyre_cooldown -func take_damage(dmg : int) : - vie -= dmg - print(vie) - if vie <= 0: - queue_free()