capsule.tscn 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. [gd_scene load_steps=4 format=3 uid="uid://byxjroc2wrbgg"]
  2. [ext_resource type="Script" path="res://composants/objets/capsule/capsule.gd" id="1_so3qe"]
  3. [ext_resource type="Texture2D" uid="uid://b5vmhiqybeilg" path="res://composants/objets/capsule/capsule_fracassante.png" id="2_e7hdn"]
  4. [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_58m61"]
  5. radius = 7.0
  6. height = 28.0
  7. [node name="Capsule" type="Node2D"]
  8. z_index = 1
  9. script = ExtResource("1_so3qe")
  10. [node name="Image" type="Sprite2D" parent="."]
  11. position = Vector2(1, 1)
  12. scale = Vector2(0.933333, 0.875)
  13. texture = ExtResource("2_e7hdn")
  14. centered = false
  15. [node name="ZoneActivation" type="Area2D" parent="."]
  16. position = Vector2(15, 8)
  17. collision_layer = 8
  18. collision_mask = 2
  19. [node name="FormeZone" type="CollisionShape2D" parent="ZoneActivation"]
  20. rotation = 1.5708
  21. shape = SubResource("CapsuleShape2D_58m61")
  22. [node name="VerificateurVisibilite" type="VisibleOnScreenNotifier2D" parent="."]
  23. rect = Rect2(0, 0, 30, 16)
  24. [connection signal="body_entered" from="ZoneActivation" to="." method="_quand_zone_activation_detecte_un_corps"]
  25. [connection signal="screen_exited" from="VerificateurVisibilite" to="." method="_quand_verificateur_visibilite_detecte_sortie_ecran"]