Boo.tscn 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [gd_scene load_steps=11 format=3 uid="uid://bpsrc21amnlgb"]
  2. [ext_resource type="Script" uid="uid://bbp3jg7yg1700" path="res://Scripts/Classes/Entities/Enemies/Boo.gd" id="1_ilcde"]
  3. [ext_resource type="Texture2D" uid="uid://c3l6ynlufxcfp" path="res://Assets/Sprites/Enemies/Boo.png" id="1_mkqqf"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="2_ilcde"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/Boo.json" id="3_xhmhl"]
  6. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="5_xhmhl"]
  7. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="6_7u2yg"]
  8. [sub_resource type="AtlasTexture" id="AtlasTexture_wu7y3"]
  9. atlas = ExtResource("1_mkqqf")
  10. region = Rect2(0, 0, 16, 16)
  11. [sub_resource type="AtlasTexture" id="AtlasTexture_7u2yg"]
  12. atlas = ExtResource("1_mkqqf")
  13. region = Rect2(16, 0, 16, 16)
  14. [sub_resource type="SpriteFrames" id="SpriteFrames_i46bk"]
  15. animations = [{
  16. "frames": [{
  17. "duration": 1.0,
  18. "texture": SubResource("AtlasTexture_wu7y3")
  19. }],
  20. "loop": true,
  21. "name": &"Move",
  22. "speed": 5.0
  23. }, {
  24. "frames": [{
  25. "duration": 1.0,
  26. "texture": SubResource("AtlasTexture_7u2yg")
  27. }],
  28. "loop": true,
  29. "name": &"WhiteIdle",
  30. "speed": 5.0
  31. }]
  32. [sub_resource type="RectangleShape2D" id="RectangleShape2D_ilcde"]
  33. size = Vector2(12, 12)
  34. [node name="Boo" type="Node2D" groups=["Enemies"]]
  35. script = ExtResource("1_ilcde")
  36. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  37. position = Vector2(0, -8)
  38. scale = Vector2(-1, 1)
  39. sprite_frames = SubResource("SpriteFrames_i46bk")
  40. animation = &"WhiteIdle"
  41. flip_h = true
  42. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  43. script = ExtResource("2_ilcde")
  44. node_to_affect = NodePath("..")
  45. property_name = "sprite_frames"
  46. resource_json = ExtResource("3_xhmhl")
  47. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  48. [node name="Hitbox" type="Area2D" parent="."]
  49. position = Vector2(0, -8)
  50. [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
  51. shape = SubResource("RectangleShape2D_ilcde")
  52. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  53. position = Vector2(0, -8)
  54. [node name="ScoreNoteSpawner" type="Node" parent="."]
  55. script = ExtResource("5_xhmhl")
  56. add_score = true
  57. play_sfx = true
  58. metadata/_custom_type_script = "uid://5octqlf4ohel"
  59. [node name="TrackJoint" type="Node" parent="."]
  60. script = ExtResource("6_7u2yg")
  61. disable_physics = false
  62. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  63. [connection signal="killed" from="." to="ScoreNoteSpawner" method="spawn_note" binds= [1000]]
  64. [connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]