ajout de l animation d attaque de l enemi

This commit is contained in:
Elouan 2025-01-25 04:34:25 +01:00
parent 204848fcf1
commit 9d772a419b
9 changed files with 127 additions and 4 deletions

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://17l5y4daoi6f"
path="res://.godot/imported/melodie-bobo-1.mp3-7aa3030b2c790daa8c4313aa01ae98f9.mp3str"
[deps]
source_file="res://ressources/sons/melodie-bobo-1.mp3"
dest_files=["res://.godot/imported/melodie-bobo-1.mp3-7aa3030b2c790daa8c4313aa01ae98f9.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dvx77b2ja5e1t"
path="res://.godot/imported/melodie-bobo-2.mp3-bb198435e05ddb0da77a07ac4cfc56ba.mp3str"
[deps]
source_file="res://ressources/sons/melodie-bobo-2.mp3"
dest_files=["res://.godot/imported/melodie-bobo-2.mp3-bb198435e05ddb0da77a07ac4cfc56ba.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://noeysgss5wsi"
path="res://.godot/imported/melodie-bobo-3.mp3-12ce345635646780a00ff0064dda381b.mp3str"
[deps]
source_file="res://ressources/sons/melodie-bobo-3.mp3"
dest_files=["res://.godot/imported/melodie-bobo-3.mp3-12ce345635646780a00ff0064dda381b.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b0y2n4slo8k3f"
path="res://.godot/imported/melodie-bobo-4.mp3-85d81fc35615c5448418bb695518b42e.mp3str"
[deps]
source_file="res://ressources/sons/melodie-bobo-4.mp3"
dest_files=["res://.godot/imported/melodie-bobo-4.mp3-85d81fc35615c5448418bb695518b42e.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bpdelql7a1hfb"
path="res://.godot/imported/melodie-bobo-5.mp3-3f367a2a630c34a5f2323ebc8535769d.mp3str"
[deps]
source_file="res://ressources/sons/melodie-bobo-5.mp3"
dest_files=["res://.godot/imported/melodie-bobo-5.mp3-3f367a2a630c34a5f2323ebc8535769d.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -37,6 +37,7 @@ expand_mode = 1
[node name="Mort" type="Label" parent="HBoxContainer/VBoxContainer/TextureRect"]
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_top = 187.0
offset_right = 414.0

View file

@ -42,6 +42,7 @@ func _process(delta: float) -> void:
func attaquer_joueur() -> void:
$AnimatedSprite2D.play("Attack")
balle = Balle.instantiate()
balle.set_direction(target_position)
balle.position = position

View file

@ -1,13 +1,22 @@
[gd_scene load_steps=6 format=3 uid="uid://voiqrkjd02om"]
[gd_scene load_steps=7 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"]
[ext_resource type="Texture2D" uid="uid://dinxaox0ug7kx" path="res://ressources/images/poulpe-atk.png" id="2_ketov"]
[sub_resource type="SpriteFrames" id="SpriteFrames_2hq77"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_ketov")
}],
"loop": true,
"name": &"Attack",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_lgwa7")
}, {
"duration": 1.0,
@ -27,7 +36,7 @@ script = ExtResource("1_hu6wh")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.4, 0.4)
sprite_frames = SubResource("SpriteFrames_2hq77")
animation = &"Generic"
animation = &"Attack"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_s7foh")

View file

@ -1,14 +1,27 @@
[gd_scene load_steps=7 format=3 uid="uid://cm5spgl8o4fam"]
[gd_scene load_steps=11 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="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://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"]
animations = [{
"frames": [{
"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")
}, {
"duration": 1.0,
@ -16,10 +29,13 @@ animations = [{
}, {
"duration": 1.0,
"texture": ExtResource("3_8bmqk")
}, {
"duration": 1.0,
"texture": ExtResource("5_muiti")
}],
"loop": true,
"name": &"Generic",
"speed": 5.0
"speed": 7.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_utjf8"]
@ -31,6 +47,7 @@ script = ExtResource("1_tikkk")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_vaeha")
animation = &"Generic"
frame_progress = 0.0803078
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-2, 6.5)