|
@@ -1,11 +1,15 @@
|
|
|
-[gd_scene load_steps=4 format=3 uid="uid://crpfyx6e5kn45"]
|
|
|
+[gd_scene load_steps=6 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"]
|
|
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_lab73"]
|
|
|
radius = 5.42
|
|
|
|
|
|
+[sub_resource type="CircleShape2D" id="CircleShape2D_cg8wg"]
|
|
|
+radius = 13.0
|
|
|
+
|
|
|
[node name="BalleElectrique" type="CharacterBody2D" groups=["groupe_des_balles"]]
|
|
|
collision_mask = 22
|
|
|
motion_mode = 1
|
|
@@ -14,9 +18,29 @@ platform_floor_layers = 2
|
|
|
platform_wall_layers = 4
|
|
|
script = ExtResource("1_fuild")
|
|
|
|
|
|
-[node name="Image" type="Sprite2D" parent="."]
|
|
|
+[node name="ImageSurcharge" type="Sprite2D" parent="."]
|
|
|
position = Vector2(-3, 0)
|
|
|
texture = ExtResource("2_rvm4r")
|
|
|
|
|
|
+[node name="ImageStatique" type="Sprite2D" parent="."]
|
|
|
+visible = false
|
|
|
+position = Vector2(-3, 0)
|
|
|
+texture = ExtResource("3_r4arp")
|
|
|
+
|
|
|
[node name="Forme" type="CollisionShape2D" parent="."]
|
|
|
shape = SubResource("CircleShape2D_lab73")
|
|
|
+
|
|
|
+[node name="ChampElectrique" type="Area2D" parent="."]
|
|
|
+collision_mask = 16
|
|
|
+
|
|
|
+[node name="PorteeChamp" type="CollisionShape2D" parent="ChampElectrique"]
|
|
|
+shape = SubResource("CircleShape2D_cg8wg")
|
|
|
+debug_color = Color(1, 0.6, 0.701961, 0.419608)
|
|
|
+
|
|
|
+[connection signal="charge" from="." to="ImageSurcharge" method="show"]
|
|
|
+[connection signal="charge" from="." to="ImageStatique" method="hide"]
|
|
|
+[connection signal="charge" from="." to="ChampElectrique" method="set_monitoring" binds= [true]]
|
|
|
+[connection signal="decharge" from="." to="ImageSurcharge" method="hide"]
|
|
|
+[connection signal="decharge" from="." to="ImageStatique" method="show"]
|
|
|
+[connection signal="decharge" from="." to="ChampElectrique" method="set_monitoring" binds= [false]]
|
|
|
+[connection signal="body_entered" from="ChampElectrique" to="." method="_quand_champ_electrique_detecte_coprs"]
|