CheckpointFlag.tscn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. [gd_scene load_steps=14 format=3 uid="uid://cassl51oehlb6"]
  2. [ext_resource type="Script" uid="uid://hk6ml16axmcc" path="res://Scripts/Classes/Entities/Objects/CheckpointFlag.gd" id="1_5d61x"]
  3. [ext_resource type="Script" uid="uid://dtdc4oaygllfa" path="res://Scripts/Parts/Checkpoint.gd" id="1_dai6d"]
  4. [ext_resource type="Texture2D" uid="uid://3rk8lq7kdaox" path="res://Assets/Sprites/Items/CheckpointFlag.png" id="1_iutnx"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_sdjg4"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Items/CheckpointFlag.json" id="4_2u6vm"]
  7. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="4_dai6d"]
  8. [sub_resource type="AtlasTexture" id="AtlasTexture_dai6d"]
  9. atlas = ExtResource("1_iutnx")
  10. region = Rect2(64, 0, 32, 32)
  11. [sub_resource type="AtlasTexture" id="AtlasTexture_6hnfv"]
  12. atlas = ExtResource("1_iutnx")
  13. region = Rect2(96, 0, 32, 32)
  14. [sub_resource type="AtlasTexture" id="AtlasTexture_sdjg4"]
  15. atlas = ExtResource("1_iutnx")
  16. region = Rect2(0, 0, 32, 32)
  17. [sub_resource type="AtlasTexture" id="AtlasTexture_2u6vm"]
  18. atlas = ExtResource("1_iutnx")
  19. region = Rect2(32, 0, 32, 32)
  20. [sub_resource type="SpriteFrames" id="SpriteFrames_1u6i2"]
  21. animations = [{
  22. "frames": [{
  23. "duration": 1.0,
  24. "texture": SubResource("AtlasTexture_dai6d")
  25. }, {
  26. "duration": 1.0,
  27. "texture": SubResource("AtlasTexture_6hnfv")
  28. }, {
  29. "duration": 1.0,
  30. "texture": SubResource("AtlasTexture_sdjg4")
  31. }, {
  32. "duration": 1.0,
  33. "texture": SubResource("AtlasTexture_6hnfv")
  34. }, {
  35. "duration": 1.0,
  36. "texture": SubResource("AtlasTexture_dai6d")
  37. }],
  38. "loop": false,
  39. "name": &"Hit",
  40. "speed": 20.0
  41. }, {
  42. "frames": [{
  43. "duration": 1.0,
  44. "texture": SubResource("AtlasTexture_2u6vm")
  45. }],
  46. "loop": true,
  47. "name": &"Idle",
  48. "speed": 5.0
  49. }]
  50. [sub_resource type="SpriteFrames" id="SpriteFrames_sdjg4"]
  51. [sub_resource type="RectangleShape2D" id="RectangleShape2D_dai6d"]
  52. size = Vector2(8, 32)
  53. [node name="CheckpointFlag" type="Node2D"]
  54. z_index = -5
  55. script = ExtResource("1_dai6d")
  56. metadata/is_flag = true
  57. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  58. process_mode = 3
  59. position = Vector2(8, -16)
  60. sprite_frames = SubResource("SpriteFrames_1u6i2")
  61. animation = &"Hit"
  62. autoplay = "Idle"
  63. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  64. script = ExtResource("3_sdjg4")
  65. node_to_affect = NodePath("..")
  66. property_name = "sprite_frames"
  67. resource_json = ExtResource("4_2u6vm")
  68. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  69. [node name="Activated" type="AnimatedSprite2D" parent="."]
  70. visible = false
  71. position = Vector2(8, -16)
  72. sprite_frames = SubResource("SpriteFrames_sdjg4")
  73. [node name="ResourceSetterNew" type="Node" parent="Activated" node_paths=PackedStringArray("node_to_affect")]
  74. script = ExtResource("3_sdjg4")
  75. node_to_affect = NodePath("..")
  76. property_name = "sprite_frames"
  77. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  78. [node name="PlayerDetection" type="Area2D" parent="."]
  79. [node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerDetection"]
  80. position = Vector2(2, -16)
  81. shape = SubResource("RectangleShape2D_dai6d")
  82. [node name="Flag" type="Node2D" parent="."]
  83. script = ExtResource("1_5d61x")
  84. [node name="ScoreNoteSpawner" type="Node" parent="."]
  85. script = ExtResource("4_dai6d")
  86. note_offset = Vector2(0, -24)
  87. add_score = true
  88. metadata/_custom_type_script = "uid://5octqlf4ohel"
  89. [connection signal="crossed" from="." to="Flag" method="activate"]
  90. [connection signal="crossed" from="." to="ScoreNoteSpawner" method="spawn_note" binds= [2000]]
  91. [connection signal="tree_exiting" from="." to="." method="on_tree_exiting"]
  92. [connection signal="area_entered" from="PlayerDetection" to="." method="on_area_entered"]