BobOmb.tscn 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. [gd_scene load_steps=26 format=3 uid="uid://b07v70sioegsj"]
  2. [ext_resource type="Script" uid="uid://br4ltfynb4eqr" path="res://Scripts/Classes/Entities/Enemies/BobOmb.gd" id="1_v5mno"]
  3. [ext_resource type="Texture2D" uid="uid://c7g10h3o7nevn" path="res://Assets/Sprites/Enemies/BobOmb.png" id="2_3rlau"]
  4. [ext_resource type="PackedScene" uid="uid://d075e1520ngrv" path="res://Scenes/Prefabs/Entities/Objects/BobOmbHeld.tscn" id="2_fur3j"]
  5. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="3_b6iml"]
  6. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="4_6tynh"]
  7. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="4_afkce"]
  8. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="5_vjas1"]
  9. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/BobOmb.json" id="5_xehcv"]
  10. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="6_v5mno"]
  11. [ext_resource type="Script" uid="uid://cmg61722ktg2m" path="res://Scripts/Classes/Components/BlockBouncingDetection.gd" id="7_rol8r"]
  12. [ext_resource type="Script" uid="uid://bbww34oiexbx2" path="res://Scripts/Classes/Components/ShellDetection.gd" id="8_6tynh"]
  13. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="9_v5mno"]
  14. [ext_resource type="Script" uid="uid://dlq6o2rg1x7in" path="res://Scripts/Classes/Components/BasicEnemyMovement.gd" id="12_xehcv"]
  15. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="14_5kc73"]
  16. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="15_d14db"]
  17. [sub_resource type="AtlasTexture" id="AtlasTexture_vjas1"]
  18. atlas = ExtResource("2_3rlau")
  19. region = Rect2(48, 0, 16, 16)
  20. [sub_resource type="AtlasTexture" id="AtlasTexture_v5mno"]
  21. atlas = ExtResource("2_3rlau")
  22. region = Rect2(32, 0, 16, 16)
  23. [sub_resource type="AtlasTexture" id="AtlasTexture_rol8r"]
  24. atlas = ExtResource("2_3rlau")
  25. region = Rect2(32, 0, 16, 16)
  26. [sub_resource type="AtlasTexture" id="AtlasTexture_fur3j"]
  27. atlas = ExtResource("2_3rlau")
  28. region = Rect2(64, 0, 16, 16)
  29. [sub_resource type="AtlasTexture" id="AtlasTexture_5kc73"]
  30. atlas = ExtResource("2_3rlau")
  31. region = Rect2(80, 0, 16, 16)
  32. [sub_resource type="AtlasTexture" id="AtlasTexture_6tynh"]
  33. atlas = ExtResource("2_3rlau")
  34. region = Rect2(0, 0, 16, 16)
  35. [sub_resource type="AtlasTexture" id="AtlasTexture_xehcv"]
  36. atlas = ExtResource("2_3rlau")
  37. region = Rect2(16, 0, 16, 16)
  38. [sub_resource type="SpriteFrames" id="SpriteFrames_fur3j"]
  39. animations = [{
  40. "frames": [{
  41. "duration": 1.0,
  42. "texture": SubResource("AtlasTexture_vjas1")
  43. }, {
  44. "duration": 1.0,
  45. "texture": SubResource("AtlasTexture_v5mno")
  46. }],
  47. "loop": true,
  48. "name": &"Flash",
  49. "speed": 10.0
  50. }, {
  51. "frames": [{
  52. "duration": 1.0,
  53. "texture": SubResource("AtlasTexture_rol8r")
  54. }],
  55. "loop": true,
  56. "name": &"Hit",
  57. "speed": 5.0
  58. }, {
  59. "frames": [{
  60. "duration": 1.0,
  61. "texture": SubResource("AtlasTexture_fur3j")
  62. }, {
  63. "duration": 1.0,
  64. "texture": SubResource("AtlasTexture_5kc73")
  65. }],
  66. "loop": true,
  67. "name": &"LitWalk",
  68. "speed": 5.0
  69. }, {
  70. "frames": [{
  71. "duration": 1.0,
  72. "texture": SubResource("AtlasTexture_6tynh")
  73. }, {
  74. "duration": 1.0,
  75. "texture": SubResource("AtlasTexture_xehcv")
  76. }],
  77. "loop": true,
  78. "name": &"Walk",
  79. "speed": 5.0
  80. }]
  81. [sub_resource type="RectangleShape2D" id="RectangleShape2D_5kc73"]
  82. size = Vector2(8, 8)
  83. [sub_resource type="RectangleShape2D" id="RectangleShape2D_d14db"]
  84. size = Vector2(12, 14)
  85. [node name="BobOmb" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Enemies"]]
  86. collision_layer = 16
  87. collision_mask = 54
  88. script = ExtResource("1_v5mno")
  89. held_scene = ExtResource("2_fur3j")
  90. on_screen_enabler = NodePath("VisibleOnScreenEnabler2D")
  91. score_note_adder = NodePath("ScoreNoteSpawner")
  92. metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
  93. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  94. position = Vector2(0, -8)
  95. scale = Vector2(-1, 1)
  96. sprite_frames = SubResource("SpriteFrames_fur3j")
  97. animation = &"Walk"
  98. autoplay = "Walk"
  99. offset = Vector2(-1, 1)
  100. flip_h = true
  101. script = ExtResource("3_b6iml")
  102. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  103. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  104. script = ExtResource("4_6tynh")
  105. node_to_affect = NodePath("..")
  106. property_name = "sprite_frames"
  107. resource_json = ExtResource("5_xehcv")
  108. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  109. [node name="LCollision" type="CollisionShape2D" parent="."]
  110. visible = false
  111. position = Vector2(0, -4)
  112. rotation = -1.5708
  113. shape = SubResource("RectangleShape2D_5kc73")
  114. one_way_collision = true
  115. [node name="RCollision" type="CollisionShape2D" parent="."]
  116. visible = false
  117. position = Vector2(0, -4)
  118. rotation = 1.5708
  119. shape = SubResource("RectangleShape2D_5kc73")
  120. one_way_collision = true
  121. [node name="Hitbox" type="Area2D" parent="."]
  122. collision_mask = 7
  123. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  124. position = Vector2(0, -5)
  125. shape = SubResource("RectangleShape2D_d14db")
  126. [node name="ScoreNoteSpawner" type="Node" parent="."]
  127. script = ExtResource("4_afkce")
  128. metadata/_custom_type_script = "uid://5octqlf4ohel"
  129. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  130. position = Vector2(0, -8)
  131. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  132. script = ExtResource("5_vjas1")
  133. hitbox = NodePath("../Hitbox")
  134. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  135. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  136. script = ExtResource("6_v5mno")
  137. hitbox = NodePath("../Hitbox")
  138. metadata/_custom_type_script = "uid://chj8hu207lrh"
  139. [node name="BlockBouncingDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  140. script = ExtResource("7_rol8r")
  141. detection_type = 1
  142. hitbox = NodePath("../Hitbox")
  143. metadata/_custom_type_script = "uid://cmg61722ktg2m"
  144. [node name="ShellDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  145. script = ExtResource("8_6tynh")
  146. hitbox = NodePath("../Hitbox")
  147. metadata/_custom_type_script = "uid://bbww34oiexbx2"
  148. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  149. script = ExtResource("9_v5mno")
  150. visuals = NodePath("../Sprite")
  151. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  152. [node name="BasicEnemyMovement" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  153. script = ExtResource("12_xehcv")
  154. visuals = NodePath("../Sprite")
  155. [node name="TrackJoint" type="Node" parent="." node_paths=PackedStringArray("movement_node")]
  156. script = ExtResource("14_5kc73")
  157. movement_node = NodePath("../BasicEnemyMovement")
  158. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  159. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  160. script = ExtResource("15_d14db")
  161. hitbox = NodePath("../Hitbox")
  162. metadata/_custom_type_script = "uid://ba18grqjixded"
  163. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  164. [connection signal="fireball_hit" from="FireballDetection" to="." method="fireball_hit"]
  165. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  166. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
  167. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
  168. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="stomped_on"]
  169. [connection signal="block_bounced" from="BlockBouncingDetection" to="." method="fireball_hit"]
  170. [connection signal="moving_shell_entered" from="ShellDetection" to="." method="die_from_object"]
  171. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="die_from_object"]
  172. [connection signal="explosion_entered" from="ExplosionDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]