[gd_scene load_steps=9 format=3 uid="uid://crpfyx6e5kn45"]

[ext_resource type="Script" path="res://composants/objets/balle/balle_elec/balle_electrique.gd" id="1_fuild"]
[ext_resource type="Texture2D" uid="uid://blttr4e575gkk" path="res://composants/objets/balle/balle_elec/09.png" id="2_rvm4r"]
[ext_resource type="Texture2D" uid="uid://86sugnk085c1" path="res://composants/objets/balle/balle_elec/10.png" id="3_r4arp"]
[ext_resource type="Script" path="res://composants/objets/balle/balle_elec/champ_detection.gd" id="4_jf5yp"]
[ext_resource type="AudioStream" uid="uid://d2aip7cvmkngl" path="res://composants/objets/balle/balle_elec/electric_hit.wav" id="5_tegew"]
[ext_resource type="AudioStream" uid="uid://bkoweg86w7xtc" path="res://composants/objets/balle/balle_elec/electric_reload.wav" id="6_54hs4"]

[sub_resource type="CircleShape2D" id="CircleShape2D_lab73"]
radius = 5.42

[sub_resource type="CircleShape2D" id="CircleShape2D_cg8wg"]
radius = 19.0

[node name="BalleElectrique" type="CharacterBody2D" groups=["groupe_des_balles"]]
position = Vector2(60, 48)
collision_mask = 22
motion_mode = 1
wall_min_slide_angle = 0.0
platform_floor_layers = 2
platform_wall_layers = 4
script = ExtResource("1_fuild")

[node name="ImageSurcharge" type="Sprite2D" parent="."]
texture = ExtResource("2_rvm4r")

[node name="ImageStatique" type="Sprite2D" parent="."]
visible = false
texture = ExtResource("3_r4arp")

[node name="Forme" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_lab73")

[node name="ChampElectrique" type="Area2D" parent="."]
collision_mask = 16
script = ExtResource("4_jf5yp")

[node name="PorteeChamp" type="CollisionShape2D" parent="ChampElectrique"]
shape = SubResource("CircleShape2D_cg8wg")
debug_color = Color(1, 0.6, 0.701961, 0.419608)

[node name="BruitDecharge" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_tegew")
bus = &"Bruits"

[node name="BruitRecharge" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_54hs4")
autoplay = true
bus = &"Bruits"

[connection signal="charge" from="." to="ImageSurcharge" method="show"]
[connection signal="charge" from="." to="ImageStatique" method="hide"]
[connection signal="charge" from="." to="ChampElectrique" method="activer_detection"]
[connection signal="charge" from="." to="BruitRecharge" method="play"]
[connection signal="decharge" from="." to="ImageSurcharge" method="hide"]
[connection signal="decharge" from="." to="ImageStatique" method="show"]
[connection signal="decharge" from="." to="ChampElectrique" method="desactiver_detection"]
[connection signal="decharge" from="." to="BruitDecharge" method="play"]
[connection signal="body_entered" from="ChampElectrique" to="." method="_quand_champ_electrique_detecte_coprs"]
