BuzzyBeetle.tscn 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. [gd_scene load_steps=22 format=3 uid="uid://doo8617qiyp77"]
  2. [ext_resource type="Script" uid="uid://q8gx0l64pcjh" path="res://Scripts/Classes/Entities/Enemies/KoopaTroopa.gd" id="1_ua110"]
  3. [ext_resource type="Texture2D" uid="uid://bs5aslhhgk8bv" path="res://Assets/Sprites/Enemies/BuzzyBeetle.png" id="2_5xvna"]
  4. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="2_obcjq"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_eu017"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/BuzzyBeetle.json" id="4_316n2"]
  7. [ext_resource type="PackedScene" uid="uid://bupy7th8ln45c" path="res://Scenes/Parts/Wing.tscn" id="5_0ayui"]
  8. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="5_eu017"]
  9. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/BuzzyBeetleShell.json" id="5_obcjq"]
  10. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="6_316n2"]
  11. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="7_5xvna"]
  12. [ext_resource type="Script" uid="uid://cmg61722ktg2m" path="res://Scripts/Classes/Components/BlockBouncingDetection.gd" id="8_n5sq7"]
  13. [ext_resource type="Script" uid="uid://bbww34oiexbx2" path="res://Scripts/Classes/Components/ShellDetection.gd" id="9_2w4oo"]
  14. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="10_8v4fy"]
  15. [ext_resource type="Script" uid="uid://dq860i312isk" path="res://Scripts/Classes/Components/IcicleDetection.gd" id="11_bxryo"]
  16. [ext_resource type="Script" uid="uid://dlq6o2rg1x7in" path="res://Scripts/Classes/Components/BasicEnemyMovement.gd" id="14_eu017"]
  17. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="15_316n2"]
  18. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="17_n5sq7"]
  19. [sub_resource type="AtlasTexture" id="AtlasTexture_n5sq7"]
  20. atlas = ExtResource("2_5xvna")
  21. region = Rect2(0, 0, 16, 16)
  22. [sub_resource type="SpriteFrames" id="SpriteFrames_2w4oo"]
  23. animations = [{
  24. "frames": [{
  25. "duration": 1.0,
  26. "texture": SubResource("AtlasTexture_n5sq7")
  27. }],
  28. "loop": true,
  29. "name": &"default",
  30. "speed": 5.0
  31. }]
  32. [sub_resource type="RectangleShape2D" id="RectangleShape2D_fop3r"]
  33. size = Vector2(12, 12)
  34. [sub_resource type="RectangleShape2D" id="RectangleShape2D_y8bq4"]
  35. size = Vector2(12, 12)
  36. [node name="BuzzyBeetle" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Enemies"]]
  37. disable_mode = 1
  38. collision_layer = 16
  39. collision_mask = 50
  40. script = ExtResource("1_ua110")
  41. shell_scene = "uid://csdbt4vd14fsg"
  42. on_screen_enabler = NodePath("VisibleOnScreenEnabler2D")
  43. score_note_adder = NodePath("ScoreNoteSpawner")
  44. metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
  45. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  46. position = Vector2(0, -8)
  47. scale = Vector2(-1, 1)
  48. sprite_frames = SubResource("SpriteFrames_2w4oo")
  49. offset = Vector2(0, 1)
  50. flip_h = true
  51. script = ExtResource("2_obcjq")
  52. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  53. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  54. script = ExtResource("3_eu017")
  55. node_to_affect = NodePath("..")
  56. property_name = "sprite_frames"
  57. resource_json = ExtResource("4_316n2")
  58. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  59. [node name="Wing" parent="Sprite" instance=ExtResource("5_0ayui")]
  60. unique_name_in_owner = true
  61. visible = false
  62. position = Vector2(-9, 1)
  63. frame_progress = 0.539258
  64. flip_h = true
  65. [node name="DeathSprite" type="AnimatedSprite2D" parent="."]
  66. visible = false
  67. position = Vector2(0, -7)
  68. script = ExtResource("2_obcjq")
  69. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  70. [node name="ResourceSetterNew" type="Node" parent="DeathSprite" node_paths=PackedStringArray("node_to_affect")]
  71. script = ExtResource("3_eu017")
  72. node_to_affect = NodePath("..")
  73. property_name = "sprite_frames"
  74. resource_json = ExtResource("5_obcjq")
  75. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  76. [node name="Collision" type="CollisionShape2D" parent="."]
  77. visible = false
  78. position = Vector2(0, -6)
  79. rotation = 1.5708
  80. shape = SubResource("RectangleShape2D_fop3r")
  81. one_way_collision = true
  82. [node name="Collision2" type="CollisionShape2D" parent="."]
  83. visible = false
  84. position = Vector2(0, -6)
  85. rotation = -1.5708
  86. shape = SubResource("RectangleShape2D_fop3r")
  87. one_way_collision = true
  88. [node name="Hitbox" type="Area2D" parent="."]
  89. visible = false
  90. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  91. position = Vector2(0, -6)
  92. shape = SubResource("RectangleShape2D_y8bq4")
  93. [node name="LedgeDetectionCast" type="RayCast2D" parent="."]
  94. position = Vector2(-8, -2)
  95. target_position = Vector2(0, 3)
  96. collision_mask = 2
  97. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  98. self_modulate = Color(1, 1, 1, 0)
  99. position = Vector2(0, -11)
  100. scale = Vector2(1, 1.3)
  101. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  102. script = ExtResource("5_eu017")
  103. hitbox = NodePath("../Hitbox")
  104. metadata/_custom_type_script = "uid://chj8hu207lrh"
  105. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  106. script = ExtResource("6_316n2")
  107. hitbox = NodePath("../Hitbox")
  108. play_sfx_on_hit = true
  109. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  110. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  111. script = ExtResource("7_5xvna")
  112. visuals = NodePath("../DeathSprite")
  113. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  114. [node name="BlockBouncingDetection" type="Node" parent="."]
  115. script = ExtResource("8_n5sq7")
  116. metadata/_custom_type_script = "uid://cmg61722ktg2m"
  117. [node name="ShellDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  118. script = ExtResource("9_2w4oo")
  119. hitbox = NodePath("../Hitbox")
  120. [node name="ScoreNoteSpawner" type="Node" parent="."]
  121. script = ExtResource("10_8v4fy")
  122. add_score = true
  123. metadata/_custom_type_script = "uid://5octqlf4ohel"
  124. [node name="IcicleDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  125. script = ExtResource("11_bxryo")
  126. hitbox = NodePath("../Hitbox")
  127. metadata/_custom_type_script = "uid://dq860i312isk"
  128. [node name="BasicEnemyMovement" type="Node" parent="."]
  129. script = ExtResource("14_eu017")
  130. auto_call = false
  131. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  132. script = ExtResource("15_316n2")
  133. hitbox = NodePath("../Hitbox")
  134. [node name="TrackJoint" type="Node" parent="." node_paths=PackedStringArray("movement_node")]
  135. script = ExtResource("17_n5sq7")
  136. movement_node = NodePath("../BasicEnemyMovement")
  137. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  138. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  139. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  140. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
  141. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
  142. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="stomped_on"]
  143. [connection signal="block_bounced" from="BlockBouncingDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
  144. [connection signal="block_bounced" from="BlockBouncingDetection" to="." method="block_bounced" unbinds=1]
  145. [connection signal="moving_shell_entered" from="ShellDetection" to="." method="die_from_object"]
  146. [connection signal="icicle_detected" from="IcicleDetection" to="." method="die_from_object"]
  147. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="die_from_object"]
  148. [connection signal="explosion_entered" from="ExplosionDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]