capsule.tscn 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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. script = ExtResource("1_so3qe")
  9. [node name="Image" type="Sprite2D" parent="."]
  10. position = Vector2(1, 1)
  11. scale = Vector2(0.933333, 0.875)
  12. texture = ExtResource("2_e7hdn")
  13. centered = false
  14. [node name="ZoneActivation" type="Area2D" parent="."]
  15. position = Vector2(15, 8)
  16. collision_layer = 8
  17. collision_mask = 2
  18. [node name="FormeZone" type="CollisionShape2D" parent="ZoneActivation"]
  19. rotation = 1.5708
  20. shape = SubResource("CapsuleShape2D_58m61")
  21. [node name="VerificateurVisibilite" type="VisibleOnScreenNotifier2D" parent="."]
  22. rect = Rect2(0, 0, 30, 16)
  23. [connection signal="body_entered" from="ZoneActivation" to="." method="_quand_zone_activation_detecte_un_corps"]
  24. [connection signal="screen_exited" from="VerificateurVisibilite" to="." method="_quand_verificateur_visibilite_detecte_sortie_ecran"]