Compare commits
1 commit
main
...
instrument
Author | SHA1 | Date | |
---|---|---|---|
142500fdd8 |
36 changed files with 100 additions and 502 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dnpbiuxu41tqr"
|
|
||||||
path="res://.godot/imported/melodie-2.png.png-1e7ec568d7b7e533e118b9283b70a243.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie-2.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie-2.png.png-1e7ec568d7b7e533e118b9283b70a243.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
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://bnh6qj2mr7ni2"
|
|
||||||
path="res://.godot/imported/melodie-4.png.png-42d7f34a3096af80d7b3a7d3a7b73e30.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie-4.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie-4.png.png-42d7f34a3096af80d7b3a7d3a7b73e30.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
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://cm886u7l583eg"
|
|
||||||
path="res://.godot/imported/melodie_cote-2.png.png-1fbf7de2f61b6cf29d5b1e195dc9a1b3.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie_cote-2.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie_cote-2.png.png-1fbf7de2f61b6cf29d5b1e195dc9a1b3.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
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://b4udql8psej1n"
|
|
||||||
path="res://.godot/imported/melodie_cote-4.png.png-a7a6a259fd83bc3cb82e28583df75ead.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie_cote-4.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie_cote-4.png.png-a7a6a259fd83bc3cb82e28583df75ead.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
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dio8ciloxv6f"
|
|
||||||
path="res://.godot/imported/melodie_dos-2.png.png-1a6d2dc47c396e3de82fda25bb80b34f.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie_dos-2.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie_dos-2.png.png-1a6d2dc47c396e3de82fda25bb80b34f.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
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://b3848xxx4bumg"
|
|
||||||
path="res://.godot/imported/melodie_dos-4.png.png-ca174ff4b410f929cf68409e5ffa0048.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/images/melodie_dos-4.png.png"
|
|
||||||
dest_files=["res://.godot/imported/melodie_dos-4.png.png-ca174ff4b410f929cf68409e5ffa0048.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
|
|
Binary file not shown.
|
@ -1,19 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="mp3"
|
|
||||||
type="AudioStreamMP3"
|
|
||||||
uid="uid://5a1syiwvowk2"
|
|
||||||
path="res://.godot/imported/blob-bobo.mp3-a17d23314def42dfb98b7e09aeeda943.mp3str"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/sons/blob-bobo.mp3"
|
|
||||||
dest_files=["res://.godot/imported/blob-bobo.mp3-a17d23314def42dfb98b7e09aeeda943.mp3str"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
loop=false
|
|
||||||
loop_offset=0
|
|
||||||
bpm=0
|
|
||||||
beat_count=0
|
|
||||||
bar_beats=4
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="mp3"
|
importer="mp3"
|
||||||
type="AudioStreamMP3"
|
type="AudioStreamMP3"
|
||||||
uid="uid://17l5y4daoi6f"
|
uid="uid://kqdamgqyyxw2"
|
||||||
path="res://.godot/imported/melodie-bobo-1.mp3-7aa3030b2c790daa8c4313aa01ae98f9.mp3str"
|
path="res://.godot/imported/melodie-bobo-1.mp3-7aa3030b2c790daa8c4313aa01ae98f9.mp3str"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="mp3"
|
importer="mp3"
|
||||||
type="AudioStreamMP3"
|
type="AudioStreamMP3"
|
||||||
uid="uid://dvx77b2ja5e1t"
|
uid="uid://08ck1o5bu3ik"
|
||||||
path="res://.godot/imported/melodie-bobo-2.mp3-bb198435e05ddb0da77a07ac4cfc56ba.mp3str"
|
path="res://.godot/imported/melodie-bobo-2.mp3-bb198435e05ddb0da77a07ac4cfc56ba.mp3str"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="mp3"
|
importer="mp3"
|
||||||
type="AudioStreamMP3"
|
type="AudioStreamMP3"
|
||||||
uid="uid://noeysgss5wsi"
|
uid="uid://br06mx63u85ws"
|
||||||
path="res://.godot/imported/melodie-bobo-3.mp3-12ce345635646780a00ff0064dda381b.mp3str"
|
path="res://.godot/imported/melodie-bobo-3.mp3-12ce345635646780a00ff0064dda381b.mp3str"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="mp3"
|
importer="mp3"
|
||||||
type="AudioStreamMP3"
|
type="AudioStreamMP3"
|
||||||
uid="uid://b0y2n4slo8k3f"
|
uid="uid://dj7u75k6nesm8"
|
||||||
path="res://.godot/imported/melodie-bobo-4.mp3-85d81fc35615c5448418bb695518b42e.mp3str"
|
path="res://.godot/imported/melodie-bobo-4.mp3-85d81fc35615c5448418bb695518b42e.mp3str"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="mp3"
|
importer="mp3"
|
||||||
type="AudioStreamMP3"
|
type="AudioStreamMP3"
|
||||||
uid="uid://bpdelql7a1hfb"
|
uid="uid://62041of2bg8o"
|
||||||
path="res://.godot/imported/melodie-bobo-5.mp3-3f367a2a630c34a5f2323ebc8535769d.mp3str"
|
path="res://.godot/imported/melodie-bobo-5.mp3-3f367a2a630c34a5f2323ebc8535769d.mp3str"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
Binary file not shown.
|
@ -1,19 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="mp3"
|
|
||||||
type="AudioStreamMP3"
|
|
||||||
uid="uid://dp6xr1dkaab2u"
|
|
||||||
path="res://.godot/imported/poulpe-bobo.mp3-ddbc62e50412213c95688398f4c2d8a6.mp3str"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/sons/poulpe-bobo.mp3"
|
|
||||||
dest_files=["res://.godot/imported/poulpe-bobo.mp3-ddbc62e50412213c95688398f4c2d8a6.mp3str"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
loop=false
|
|
||||||
loop_offset=0
|
|
||||||
bpm=0
|
|
||||||
beat_count=0
|
|
||||||
bar_beats=4
|
|
Binary file not shown.
|
@ -1,19 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="mp3"
|
|
||||||
type="AudioStreamMP3"
|
|
||||||
uid="uid://bduu3c4c05k6i"
|
|
||||||
path="res://.godot/imported/roby-bobo.mp3-4c91f97263eb900e643d718eb309f330.mp3str"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://ressources/sons/roby-bobo.mp3"
|
|
||||||
dest_files=["res://.godot/imported/roby-bobo.mp3-4c91f97263eb900e643d718eb309f330.mp3str"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
loop=false
|
|
||||||
loop_offset=0
|
|
||||||
bpm=0
|
|
||||||
beat_count=0
|
|
||||||
bar_beats=4
|
|
|
@ -8,8 +8,8 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://dhva3tivsvknl" path="res://ressources/images/mur_coin.svg" id="4_6a3f6"]
|
[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://di4chlep1t1or" path="res://parametres/menu_parametres.tscn" id="6_6ubhx"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bndtclt51nsih" path="res://scenes/interface.tscn" id="8_5s7tf"]
|
[ext_resource type="PackedScene" uid="uid://bndtclt51nsih" path="res://scenes/interface.tscn" id="8_5s7tf"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bdpm5s1tpslhc" path="res://scenes/pickups/flute_pickup.tscn" id="10_0do8n"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ctgxrbcg2vu1p" path="res://scenes/ecran_mort.tscn" id="10_3ou8w"]
|
[ext_resource type="PackedScene" uid="uid://ctgxrbcg2vu1p" path="res://scenes/ecran_mort.tscn" id="10_3ou8w"]
|
||||||
[ext_resource type="Script" path="res://scenes/vague.gd" id="12_n6lb5"]
|
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_1c4te"]
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_1c4te"]
|
||||||
normal = Vector2(0, 1)
|
normal = Vector2(0, 1)
|
||||||
|
@ -43,6 +43,11 @@ offset_bottom = 360.0
|
||||||
texture = ExtResource("2_torsx")
|
texture = ExtResource("2_torsx")
|
||||||
stretch_mode = 1
|
stretch_mode = 1
|
||||||
|
|
||||||
|
[node name="Player_Melodie" parent="." node_paths=PackedStringArray("interface") groups=["Player"] instance=ExtResource("1_cl1wt")]
|
||||||
|
position = Vector2(0, 200)
|
||||||
|
scale = Vector2(3, 3)
|
||||||
|
interface = NodePath("../Interface")
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="." groups=["World_Border"]]
|
[node name="StaticBody2D" type="StaticBody2D" parent="." groups=["World_Border"]]
|
||||||
collision_layer = 3
|
collision_layer = 3
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
|
@ -151,31 +156,9 @@ offset_top = -383.0
|
||||||
offset_right = -258.0
|
offset_right = -258.0
|
||||||
offset_bottom = -383.0
|
offset_bottom = -383.0
|
||||||
|
|
||||||
[node name="vague" type="Node2D" parent="." node_paths=PackedStringArray("spawner1", "spawner2", "spawner3", "spawner4")]
|
[node name="InstrumentPickup" parent="." instance=ExtResource("10_0do8n")]
|
||||||
script = ExtResource("12_n6lb5")
|
position = Vector2(2, -64)
|
||||||
spawner1 = NodePath("Spawner1")
|
scale = Vector2(0.15, 0.15)
|
||||||
spawner2 = NodePath("Spawner2")
|
|
||||||
spawner3 = NodePath("Spawner3")
|
|
||||||
spawner4 = NodePath("Spawner4")
|
|
||||||
|
|
||||||
[node name="Spawner1" type="Node2D" parent="vague"]
|
|
||||||
position = Vector2(482, -232)
|
|
||||||
|
|
||||||
[node name="Spawner2" type="Node2D" parent="vague"]
|
|
||||||
position = Vector2(-538, 238)
|
|
||||||
|
|
||||||
[node name="Spawner3" type="Node2D" parent="vague"]
|
|
||||||
position = Vector2(-502, -240)
|
|
||||||
|
|
||||||
[node name="Spawner4" type="Node2D" parent="vague"]
|
|
||||||
position = Vector2(484, 220)
|
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="vague"]
|
|
||||||
|
|
||||||
[node name="Player_Melodie" parent="vague" node_paths=PackedStringArray("interface") instance=ExtResource("1_cl1wt")]
|
|
||||||
scale = Vector2(3, 3)
|
|
||||||
interface = NodePath("../../Interface")
|
|
||||||
|
|
||||||
[connection signal="finished" from="Musique" to="." method="_on_audio_stream_player_finished"]
|
[connection signal="finished" from="Musique" to="." method="_on_audio_stream_player_finished"]
|
||||||
[connection signal="retour_menu" from="Ecran mort" to="." method="_on_ecran_mort_retour_menu"]
|
[connection signal="retour_menu" from="Ecran mort" to="." method="_on_ecran_mort_retour_menu"]
|
||||||
[connection signal="timeout" from="vague/Timer" to="vague" method="_on_timer_timeout"]
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://dqfrqntx73do5" path="res://ressources/images/menu_jeu_button.svg" id="3_ecfx2"]
|
[ext_resource type="Texture2D" uid="uid://dqfrqntx73do5" path="res://ressources/images/menu_jeu_button.svg" id="3_ecfx2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://kpss4kt07w8l" path="res://ressources/images/menu_jeu_button_survole.svg" id="4_jv24w"]
|
[ext_resource type="Texture2D" uid="uid://kpss4kt07w8l" path="res://ressources/images/menu_jeu_button_survole.svg" id="4_jv24w"]
|
||||||
|
|
||||||
[node name="Control2" type="Control"]
|
[node name="Control" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -37,7 +37,6 @@ expand_mode = 1
|
||||||
[node name="Mort" type="Label" parent="HBoxContainer/VBoxContainer/TextureRect"]
|
[node name="Mort" type="Label" parent="HBoxContainer/VBoxContainer/TextureRect"]
|
||||||
modulate = Color(0.917647, 0.941176, 0.847059, 1)
|
modulate = Color(0.917647, 0.941176, 0.847059, 1)
|
||||||
self_modulate = Color(0.917647, 0.941176, 0.847059, 1)
|
self_modulate = Color(0.917647, 0.941176, 0.847059, 1)
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 89.0
|
offset_left = 89.0
|
||||||
offset_top = 187.0
|
offset_top = 187.0
|
||||||
offset_right = 414.0
|
offset_right = 414.0
|
||||||
|
|
|
@ -42,7 +42,6 @@ func _process(delta: float) -> void:
|
||||||
|
|
||||||
|
|
||||||
func attaquer_joueur() -> void:
|
func attaquer_joueur() -> void:
|
||||||
$AnimatedSprite2D.play("Attack")
|
|
||||||
balle = Balle.instantiate()
|
balle = Balle.instantiate()
|
||||||
balle.set_direction(target_position)
|
balle.set_direction(target_position)
|
||||||
balle.position = position
|
balle.position = position
|
||||||
|
|
|
@ -1,22 +1,13 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://voiqrkjd02om"]
|
[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="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://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"]
|
[ext_resource type="Texture2D" uid="uid://b4ukmsspx16f" path="res://ressources/images/poulpe-2.png" id="2_5x4i5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dinxaox0ug7kx" path="res://ressources/images/poulpe-atk.png" id="2_ketov"]
|
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_2hq77"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_2hq77"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("2_ketov")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"Attack",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("1_lgwa7")
|
"texture": ExtResource("1_lgwa7")
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
@ -30,13 +21,13 @@ animations = [{
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_s7foh"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_s7foh"]
|
||||||
radius = 38.2753
|
radius = 38.2753
|
||||||
|
|
||||||
[node name="Poulpe" type="CharacterBody2D" groups=["Enemies"]]
|
[node name="Poulpe" type="CharacterBody2D"]
|
||||||
script = ExtResource("1_hu6wh")
|
script = ExtResource("1_hu6wh")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
scale = Vector2(0.4, 0.4)
|
scale = Vector2(0.4, 0.4)
|
||||||
sprite_frames = SubResource("SpriteFrames_2hq77")
|
sprite_frames = SubResource("SpriteFrames_2hq77")
|
||||||
animation = &"Attack"
|
animation = &"Generic"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_s7foh")
|
shape = SubResource("CircleShape2D_s7foh")
|
||||||
|
|
|
@ -1,27 +1,14 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://cm5spgl8o4fam"]
|
[gd_scene load_steps=7 format=3 uid="uid://cm5spgl8o4fam"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dwwe0eanmrcra" path="res://ressources/images/roby-idle-0.png" id="1_mo3hb"]
|
[ext_resource type="Texture2D" uid="uid://dwwe0eanmrcra" path="res://ressources/images/roby-idle-0.png" id="1_mo3hb"]
|
||||||
[ext_resource type="Script" path="res://scenes/enemies/robot.gd" id="1_tikkk"]
|
[ext_resource type="Script" path="res://scenes/enemies/robot.gd" id="1_tikkk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://8m84oe4oes3u" path="res://ressources/images/roby-idle-1.png" id="2_4n77m"]
|
[ext_resource type="Texture2D" uid="uid://8m84oe4oes3u" path="res://ressources/images/roby-idle-1.png" id="2_4n77m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dcyf6teijpttj" path="res://ressources/images/roby-idle-2.png" id="3_8bmqk"]
|
[ext_resource type="Texture2D" uid="uid://dcyf6teijpttj" path="res://ressources/images/roby-idle-2.png" id="3_8bmqk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://duto5skmjixh6" path="res://ressources/images/roby-atk-0.png" id="5_muiti"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://8xhcmbkyxlwb" path="res://ressources/images/roby-atk-1.png" id="6_otdac"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://br8d144g0u2le" path="res://ressources/images/roby-atk-2.png" id="7_nsi5m"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cxvxfwv2nii64" path="res://ressources/images/roby-atk-3.png" id="8_tsp5e"]
|
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_vaeha"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_vaeha"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("6_otdac")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("7_nsi5m")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("8_tsp5e")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("1_mo3hb")
|
"texture": ExtResource("1_mo3hb")
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
@ -29,25 +16,21 @@ animations = [{
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("3_8bmqk")
|
"texture": ExtResource("3_8bmqk")
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("5_muiti")
|
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"Generic",
|
"name": &"Generic",
|
||||||
"speed": 7.0
|
"speed": 5.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_utjf8"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_utjf8"]
|
||||||
size = Vector2(126, 185)
|
size = Vector2(126, 185)
|
||||||
|
|
||||||
[node name="Robot" type="CharacterBody2D" groups=["Enemies"]]
|
[node name="Robot" type="CharacterBody2D"]
|
||||||
script = ExtResource("1_tikkk")
|
script = ExtResource("1_tikkk")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
sprite_frames = SubResource("SpriteFrames_vaeha")
|
sprite_frames = SubResource("SpriteFrames_vaeha")
|
||||||
animation = &"Generic"
|
animation = &"Generic"
|
||||||
frame_progress = 0.260687
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(-2, 6.5)
|
position = Vector2(-2, 6.5)
|
||||||
|
|
|
@ -21,7 +21,7 @@ animations = [{
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_bokrm"]
|
||||||
radius = 20.0
|
radius = 20.0
|
||||||
|
|
||||||
[node name="Slime" type="CharacterBody2D" groups=["Enemies"]]
|
[node name="Slime" type="CharacterBody2D"]
|
||||||
collision_layer = 6
|
collision_layer = 6
|
||||||
collision_mask = 6
|
collision_mask = 6
|
||||||
script = ExtResource("1_hnufy")
|
script = ExtResource("1_hnufy")
|
||||||
|
|
21
scenes/pickups/flute_pickup.tscn
Normal file
21
scenes/pickups/flute_pickup.tscn
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bdpm5s1tpslhc"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bncbi6cd1m5y7" path="res://ressources/images/flute.svg" id="1_7m80x"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Instrument/flute_pickup.gd" id="1_42t6n"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_rt2x3"]
|
||||||
|
radius = 50.0
|
||||||
|
height = 613.39
|
||||||
|
|
||||||
|
[node name="FlutePickup" type="Area2D"]
|
||||||
|
collision_layer = 0
|
||||||
|
script = ExtResource("1_42t6n")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
texture = ExtResource("1_7m80x")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
rotation = -0.785398
|
||||||
|
shape = SubResource("CapsuleShape2D_rt2x3")
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
|
@ -7,7 +7,7 @@
|
||||||
radius = 6.0
|
radius = 6.0
|
||||||
height = 32.0
|
height = 32.0
|
||||||
|
|
||||||
[node name="Player_Melodie" type="CharacterBody2D" groups=["Player"]]
|
[node name="Player_Melodie" type="CharacterBody2D"]
|
||||||
collision_layer = 5
|
collision_layer = 5
|
||||||
script = ExtResource("1_7sg4g")
|
script = ExtResource("1_7sg4g")
|
||||||
|
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
extends Node2D
|
|
||||||
|
|
||||||
@export var spawner1: Node2D
|
|
||||||
@export var spawner2: Node2D
|
|
||||||
@export var spawner3: Node2D
|
|
||||||
@export var spawner4: Node2D
|
|
||||||
|
|
||||||
class Vague:
|
|
||||||
var poulpes: int
|
|
||||||
var slimes: int
|
|
||||||
var robots: int
|
|
||||||
|
|
||||||
func _init(poulpes: int, slimes: int, robots: int):
|
|
||||||
self.poulpes = poulpes
|
|
||||||
self.slimes = slimes
|
|
||||||
self.robots = robots
|
|
||||||
|
|
||||||
# Waves and spawners
|
|
||||||
var vagues = [
|
|
||||||
Vague.new(0, 1, 0),
|
|
||||||
Vague.new(1, 1, 0),
|
|
||||||
Vague.new(1, 2, 0),
|
|
||||||
Vague.new(2, 2, 1),
|
|
||||||
Vague.new(2, 3, 1),
|
|
||||||
Vague.new(3, 3, 2),
|
|
||||||
Vague.new(3, 1, 2),
|
|
||||||
Vague.new(1, 4, 3),
|
|
||||||
Vague.new(2, 2, 3),
|
|
||||||
Vague.new(1, 5, 2),
|
|
||||||
Vague.new(2, 3, 2),
|
|
||||||
Vague.new(3, 2, 1),
|
|
||||||
Vague.new(1, 4, 3),
|
|
||||||
Vague.new(4, 1, 2),
|
|
||||||
Vague.new(2, 2, 3),
|
|
||||||
Vague.new(1, 5, 1),
|
|
||||||
Vague.new(3, 1, 4),
|
|
||||||
Vague.new(4, 3, 1),
|
|
||||||
Vague.new(3, 4, 2),
|
|
||||||
Vague.new(1, 2, 4),
|
|
||||||
Vague.new(3, 5, 2)
|
|
||||||
]
|
|
||||||
|
|
||||||
var spawners = []
|
|
||||||
|
|
||||||
var vague_actuelle = 0
|
|
||||||
var poulpe_scene: PackedScene
|
|
||||||
var slime_scene: PackedScene
|
|
||||||
var robot_scene: PackedScene
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
poulpe_scene = load("res://scenes/enemies/poulpe.tscn")
|
|
||||||
slime_scene = load("res://scenes/enemies/slime.tscn")
|
|
||||||
robot_scene = load("res://scenes/enemies/robot.tscn")
|
|
||||||
|
|
||||||
spawners = [spawner1, spawner2, spawner3, spawner4]
|
|
||||||
|
|
||||||
# Ensure spawners are set
|
|
||||||
for spawner in spawners:
|
|
||||||
if spawner == null:
|
|
||||||
push_error("Spawner is not assigned.")
|
|
||||||
|
|
||||||
$Timer.start(2)
|
|
||||||
|
|
||||||
func instancier_ennemis(vague: Vague):
|
|
||||||
for i in range(vague.poulpes):
|
|
||||||
var spawner = spawners[randi() % len(spawners)]
|
|
||||||
var poulpe_instance = poulpe_scene.instantiate()
|
|
||||||
poulpe_instance.position = spawner.global_position
|
|
||||||
add_child(poulpe_instance)
|
|
||||||
|
|
||||||
for i in range(vague.slimes):
|
|
||||||
var spawner = spawners[randi() % len(spawners)]
|
|
||||||
var slime_instance = slime_scene.instantiate()
|
|
||||||
slime_instance.position = spawner.global_position
|
|
||||||
add_child(slime_instance)
|
|
||||||
|
|
||||||
for i in range(vague.robots):
|
|
||||||
var spawner = spawners[randi() % len(spawners)]
|
|
||||||
var robot_instance = robot_scene.instantiate()
|
|
||||||
robot_instance.position = spawner.global_position
|
|
||||||
add_child(robot_instance)
|
|
||||||
|
|
||||||
func _on_timer_timeout():
|
|
||||||
if vague_actuelle < len(vagues):
|
|
||||||
print("t")
|
|
||||||
instancier_ennemis(vagues[vague_actuelle])
|
|
||||||
vague_actuelle = (vague_actuelle + 1) % len(vagues)
|
|
||||||
$Timer.set_wait_time(30)
|
|
||||||
$Timer.start()
|
|
||||||
else:
|
|
||||||
print("All waves cleared!")
|
|
|
@ -1,22 +0,0 @@
|
||||||
vagues:
|
|
||||||
- {slime: 1, poulpe: 0, robot: 0}
|
|
||||||
- {slime: 1, poulpe: 1, robot: 0}
|
|
||||||
- {slime: 2, poulpe: 1, robot: 0}
|
|
||||||
- {slime: 2, poulpe: 2, robot: 1}
|
|
||||||
- {slime: 3, poulpe: 2, robot: 1}
|
|
||||||
- {slime: 3, poulpe: 3, robot: 2}
|
|
||||||
- {slime: 4, poulpe: 3, robot: 2}
|
|
||||||
- {slime: 4, poulpe: 4, robot: 3}
|
|
||||||
- {slime: 5, poulpe: 4, robot: 3}
|
|
||||||
- {slime: 5, poulpe: 5, robot: 4}
|
|
||||||
- {slime: 3, poulpe: 2, robot: 2}
|
|
||||||
- {slime: 2, poulpe: 3, robot: 1}
|
|
||||||
- {slime: 4, poulpe: 1, robot: 3}
|
|
||||||
- {slime: 1, poulpe: 4, robot: 2}
|
|
||||||
- {slime: 2, poulpe: 2, robot: 3}
|
|
||||||
- {slime: 5, poulpe: 1, robot: 1}
|
|
||||||
- {slime: 1, poulpe: 3, robot: 4}
|
|
||||||
- {slime: 3, poulpe: 4, robot: 1}
|
|
||||||
- {slime: 4, poulpe: 3, robot: 2}
|
|
||||||
- {slime: 2, poulpe: 1, robot: 4}
|
|
||||||
- {slime: 5, poulpe: 3, robot: 2}
|
|
|
@ -1,30 +0,0 @@
|
||||||
extends Node
|
|
||||||
|
|
||||||
func lire_yaml():
|
|
||||||
var fichier = FileAccess.open("res://scenes/vague/vague.yaml", FileAccess.READ)
|
|
||||||
if fichier != null:
|
|
||||||
var contenu = fichier.get_as_text()
|
|
||||||
fichier = null
|
|
||||||
var yaml_contenu = parse_yaml(contenu)
|
|
||||||
return yaml_contenu
|
|
||||||
else:
|
|
||||||
print("Erreur lors de la lecture du fichier YAML")
|
|
||||||
return null
|
|
||||||
|
|
||||||
func parse_yaml(yaml_text):
|
|
||||||
# Godot ne prend pas en charge nativement les fichiers YAML.
|
|
||||||
# Vous devrez utiliser une bibliothèque externe pour parser les fichiers YAML.
|
|
||||||
print("Erreur : Godot ne prend pas en charge nativement les fichiers YAML")
|
|
||||||
return null
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
var contenu = lire_yaml()
|
|
||||||
if contenu:
|
|
||||||
print(contenu)
|
|
||||||
var vagues = contenu["vagues"]
|
|
||||||
for i in range(len(vagues)):
|
|
||||||
var vague = vagues[i]
|
|
||||||
print("Vague ", i+1)
|
|
||||||
print(" Slime : ", vague["slime"])
|
|
||||||
print(" Poulpe : ", vague["poulpe"])
|
|
||||||
print(" Robot : ", vague["robot"])
|
|
18
scripts/Instrument/flute_pickup.gd
Normal file
18
scripts/Instrument/flute_pickup.gd
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
|
if body.is_in_group("Player") :
|
||||||
|
body.pick_up("flute")
|
||||||
|
queue_free()
|
|
@ -28,6 +28,8 @@ var instrument_list = [
|
||||||
|
|
||||||
var vie = 10
|
var vie = 10
|
||||||
|
|
||||||
|
signal instrument_switch
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
flute = load("res://scripts/Instrument/Flute.gd").new()
|
flute = load("res://scripts/Instrument/Flute.gd").new()
|
||||||
flute.set_scene_parent(get_tree().get_root())
|
flute.set_scene_parent(get_tree().get_root())
|
||||||
|
@ -38,31 +40,10 @@ func _ready() -> void:
|
||||||
lyre = load("res://scripts/Instrument/Lyre.gd").new()
|
lyre = load("res://scripts/Instrument/Lyre.gd").new()
|
||||||
lyre.set_scene_parent(get_tree().get_root())
|
lyre.set_scene_parent(get_tree().get_root())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func play_music(delta : float):
|
||||||
var direction : Vector2 = Vector2.ZERO
|
|
||||||
direction.x = Input.get_action_raw_strength("BOUGER_DROITE") - Input.get_action_raw_strength("BOUGER_GAUCHE")
|
|
||||||
direction.y = Input.get_action_raw_strength("BOUGER_BAS") - Input.get_action_raw_strength("BOUGER_HAUT")
|
|
||||||
|
|
||||||
if direction != Vector2.ZERO:
|
|
||||||
if direction == previous_direction:
|
|
||||||
if direction.x != 0 and direction.y != 0:
|
|
||||||
boost_speed = min(boost_speed + acceleration / 16, (max_boost_speed - move_speed) / 8)
|
|
||||||
else:
|
|
||||||
boost_speed = min(boost_speed + acceleration, max_boost_speed - move_speed)
|
|
||||||
else:
|
|
||||||
boost_speed = 0
|
|
||||||
|
|
||||||
previous_direction = direction
|
|
||||||
velocity = direction * (move_speed + boost_speed)
|
|
||||||
else:
|
|
||||||
velocity = Vector2.ZERO
|
|
||||||
|
|
||||||
var direction_balle = Vector2.ZERO
|
var direction_balle = Vector2.ZERO
|
||||||
var angle = 0
|
var angle = 0
|
||||||
var angle_lyre = 0
|
var angle_lyre = 0
|
||||||
|
@ -83,7 +64,7 @@ func _process(delta: float) -> void:
|
||||||
direction_balle = Vector2(-1, 0)
|
direction_balle = Vector2(-1, 0)
|
||||||
angle = 90
|
angle = 90
|
||||||
angle_lyre = 180
|
angle_lyre = 180
|
||||||
|
|
||||||
if flute_timer > 0:
|
if flute_timer > 0:
|
||||||
flute_timer -= delta
|
flute_timer -= delta
|
||||||
|
|
||||||
|
@ -92,20 +73,47 @@ func _process(delta: float) -> void:
|
||||||
|
|
||||||
if lyre_timer > 0:
|
if lyre_timer > 0:
|
||||||
lyre_timer -= delta
|
lyre_timer -= delta
|
||||||
|
|
||||||
if flute and flute_timer <= 0.0 and direction_balle != Vector2.ZERO:
|
if instrument_list.has("flute") and flute_timer <= 0.0 and direction_balle != Vector2.ZERO:
|
||||||
flute.jouer_melodie(position, direction_balle, angle)
|
flute.jouer_melodie(position, direction_balle, angle)
|
||||||
flute_timer = flute_cooldown
|
flute_timer = flute_cooldown
|
||||||
|
if instrument_list.has("tambour") and tambour_timer <= 0.0 and direction_balle != Vector2.ZERO:
|
||||||
if tambour and tambour_timer <= 0.0 and direction_balle != Vector2.ZERO:
|
|
||||||
tambour.jouer_melodie(position)
|
tambour.jouer_melodie(position)
|
||||||
tambour_timer = tambour_cooldown
|
tambour_timer = tambour_cooldown
|
||||||
|
if instrument_list.has("lyre") and lyre_timer <= 0.0 and direction_balle != Vector2.ZERO :
|
||||||
if lyre and lyre_timer <= 0.0 and direction_balle != Vector2.ZERO:
|
|
||||||
lyre.jouer_melodie(position, direction_balle, angle_lyre)
|
lyre.jouer_melodie(position, direction_balle, angle_lyre)
|
||||||
lyre_timer = lyre_cooldown
|
lyre_timer = lyre_cooldown
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var direction : Vector2 = Vector2.ZERO
|
||||||
|
direction.x = Input.get_action_raw_strength("BOUGER_DROITE") - Input.get_action_raw_strength("BOUGER_GAUCHE")
|
||||||
|
direction.y = Input.get_action_raw_strength("BOUGER_BAS") - Input.get_action_raw_strength("BOUGER_HAUT")
|
||||||
|
|
||||||
|
if direction != Vector2.ZERO:
|
||||||
|
if direction == previous_direction:
|
||||||
|
if direction.x != 0 and direction.y != 0:
|
||||||
|
boost_speed = min(boost_speed + acceleration / 16, (max_boost_speed - move_speed) / 8)
|
||||||
|
else:
|
||||||
|
boost_speed = min(boost_speed + acceleration, max_boost_speed - move_speed)
|
||||||
|
else:
|
||||||
|
boost_speed = 0
|
||||||
|
|
||||||
|
previous_direction = direction
|
||||||
|
velocity = direction * (move_speed + boost_speed)
|
||||||
|
else:
|
||||||
|
velocity = Vector2.ZERO
|
||||||
|
|
||||||
|
play_music(delta)
|
||||||
|
|
||||||
|
func pick_up(instrument : String) :
|
||||||
|
if len(instrument_list) < 2 :
|
||||||
|
instrument_list.append(instrument)
|
||||||
|
else :
|
||||||
|
instrument_list[0] = instrument_list[1]
|
||||||
|
instrument_list[1] = instrument
|
||||||
|
instrument_switch.emit()
|
||||||
|
|
||||||
func take_damage(dmg : int) :
|
func take_damage(dmg : int) :
|
||||||
vie -= dmg
|
vie -= dmg
|
||||||
interface.set_life(vie)
|
interface.set_life(vie)
|
||||||
|
|
Loading…
Add table
Reference in a new issue