BobOmbHeld.tscn 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. [gd_scene load_steps=28 format=3 uid="uid://d075e1520ngrv"]
  2. [ext_resource type="Texture2D" uid="uid://c7g10h3o7nevn" path="res://Assets/Sprites/Enemies/BobOmb.png" id="1_etkhh"]
  3. [ext_resource type="Script" uid="uid://baie518kyfenr" path="res://Scripts/Classes/Entities/Objects/BobOmbHeld.gd" id="1_j3rs3"]
  4. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="2_dd5rd"]
  5. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="3_5qjsg"]
  6. [ext_resource type="Script" uid="uid://bx6r8sjar6cwr" path="res://Scripts/Classes/Components/BasicStaticMovement.gd" id="4_70th7"]
  7. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="4_hgi3d"]
  8. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/BobOmb.json" id="5_pn2vf"]
  9. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="5_t0tau"]
  10. [ext_resource type="Script" uid="uid://bbww34oiexbx2" path="res://Scripts/Classes/Components/ShellDetection.gd" id="6_j3rs3"]
  11. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/LitBobOmb.json" id="6_pn2vf"]
  12. [ext_resource type="Script" uid="uid://cmg61722ktg2m" path="res://Scripts/Classes/Components/BlockBouncingDetection.gd" id="7_yf454"]
  13. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="9_yf454"]
  14. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="13_tv0mo"]
  15. [sub_resource type="AtlasTexture" id="AtlasTexture_vjas1"]
  16. atlas = ExtResource("1_etkhh")
  17. region = Rect2(48, 0, 16, 16)
  18. [sub_resource type="AtlasTexture" id="AtlasTexture_v5mno"]
  19. atlas = ExtResource("1_etkhh")
  20. region = Rect2(32, 0, 16, 16)
  21. [sub_resource type="AtlasTexture" id="AtlasTexture_rol8r"]
  22. atlas = ExtResource("1_etkhh")
  23. region = Rect2(32, 0, 16, 16)
  24. [sub_resource type="AtlasTexture" id="AtlasTexture_6tynh"]
  25. atlas = ExtResource("1_etkhh")
  26. region = Rect2(0, 0, 16, 16)
  27. [sub_resource type="AtlasTexture" id="AtlasTexture_xehcv"]
  28. atlas = ExtResource("1_etkhh")
  29. region = Rect2(16, 0, 16, 16)
  30. [sub_resource type="SpriteFrames" id="SpriteFrames_5qjsg"]
  31. animations = [{
  32. "frames": [{
  33. "duration": 1.0,
  34. "texture": SubResource("AtlasTexture_vjas1")
  35. }, {
  36. "duration": 1.0,
  37. "texture": SubResource("AtlasTexture_v5mno")
  38. }],
  39. "loop": true,
  40. "name": &"Flash",
  41. "speed": 10.0
  42. }, {
  43. "frames": [{
  44. "duration": 1.0,
  45. "texture": SubResource("AtlasTexture_rol8r")
  46. }],
  47. "loop": true,
  48. "name": &"Hit",
  49. "speed": 5.0
  50. }, {
  51. "frames": [{
  52. "duration": 1.0,
  53. "texture": SubResource("AtlasTexture_6tynh")
  54. }, {
  55. "duration": 1.0,
  56. "texture": SubResource("AtlasTexture_xehcv")
  57. }],
  58. "loop": true,
  59. "name": &"Walk",
  60. "speed": 5.0
  61. }]
  62. [sub_resource type="Animation" id="Animation_hgi3d"]
  63. resource_name = "Flash"
  64. length = 0.2
  65. loop_mode = 1
  66. tracks/0/type = "value"
  67. tracks/0/imported = false
  68. tracks/0/enabled = true
  69. tracks/0/path = NodePath("FlashSprite:visible")
  70. tracks/0/interp = 1
  71. tracks/0/loop_wrap = true
  72. tracks/0/keys = {
  73. "times": PackedFloat32Array(0, 0.1),
  74. "transitions": PackedFloat32Array(1, 1),
  75. "update": 1,
  76. "values": [true, false]
  77. }
  78. [sub_resource type="Animation" id="Animation_pn2vf"]
  79. length = 0.001
  80. tracks/0/type = "value"
  81. tracks/0/imported = false
  82. tracks/0/enabled = true
  83. tracks/0/path = NodePath("FlashSprite:visible")
  84. tracks/0/interp = 1
  85. tracks/0/loop_wrap = true
  86. tracks/0/keys = {
  87. "times": PackedFloat32Array(0),
  88. "transitions": PackedFloat32Array(1),
  89. "update": 1,
  90. "values": [false]
  91. }
  92. [sub_resource type="AnimationLibrary" id="AnimationLibrary_tv0mo"]
  93. _data = {
  94. &"Flash": SubResource("Animation_hgi3d"),
  95. &"RESET": SubResource("Animation_pn2vf")
  96. }
  97. [sub_resource type="RectangleShape2D" id="RectangleShape2D_70th7"]
  98. size = Vector2(8, 8)
  99. [sub_resource type="RectangleShape2D" id="RectangleShape2D_hagok"]
  100. size = Vector2(12, 12)
  101. [sub_resource type="Animation" id="Animation_j3rs3"]
  102. resource_name = "Explode"
  103. length = 0.2
  104. tracks/0/type = "value"
  105. tracks/0/imported = false
  106. tracks/0/enabled = true
  107. tracks/0/path = NodePath("ScaleJoint:scale")
  108. tracks/0/interp = 2
  109. tracks/0/loop_wrap = true
  110. tracks/0/keys = {
  111. "times": PackedFloat32Array(0, 0.2),
  112. "transitions": PackedFloat32Array(1, 1),
  113. "update": 0,
  114. "values": [Vector2(1, 1), Vector2(1.25, 1.25)]
  115. }
  116. [sub_resource type="Animation" id="Animation_yf454"]
  117. length = 0.001
  118. tracks/0/type = "value"
  119. tracks/0/imported = false
  120. tracks/0/enabled = true
  121. tracks/0/path = NodePath("ScaleJoint:scale")
  122. tracks/0/interp = 1
  123. tracks/0/loop_wrap = true
  124. tracks/0/keys = {
  125. "times": PackedFloat32Array(0),
  126. "transitions": PackedFloat32Array(1),
  127. "update": 0,
  128. "values": [Vector2(1, 1)]
  129. }
  130. [sub_resource type="AnimationLibrary" id="AnimationLibrary_ll0jm"]
  131. _data = {
  132. &"Explode": SubResource("Animation_j3rs3"),
  133. &"RESET": SubResource("Animation_yf454")
  134. }
  135. [node name="BobOmbHeld" type="CharacterBody2D"]
  136. collision_layer = 32
  137. collision_mask = 2
  138. script = ExtResource("1_j3rs3")
  139. [node name="ScaleJoint" type="Node2D" parent="."]
  140. [node name="Sprite" type="AnimatedSprite2D" parent="ScaleJoint"]
  141. unique_name_in_owner = true
  142. position = Vector2(0, -8)
  143. scale = Vector2(-1, 1)
  144. sprite_frames = SubResource("SpriteFrames_5qjsg")
  145. animation = &"Hit"
  146. offset = Vector2(-1, 1)
  147. flip_h = true
  148. script = ExtResource("2_dd5rd")
  149. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  150. [node name="ResourceSetterNew" type="Node" parent="ScaleJoint/Sprite" node_paths=PackedStringArray("node_to_affect")]
  151. script = ExtResource("4_hgi3d")
  152. node_to_affect = NodePath("..")
  153. property_name = "sprite_frames"
  154. resource_json = ExtResource("5_pn2vf")
  155. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  156. [node name="FlashAnimation" type="AnimationPlayer" parent="ScaleJoint/Sprite"]
  157. unique_name_in_owner = true
  158. libraries = {
  159. &"": SubResource("AnimationLibrary_tv0mo")
  160. }
  161. [node name="FlashSprite" type="AnimatedSprite2D" parent="ScaleJoint/Sprite"]
  162. visible = false
  163. position = Vector2(-2, 0)
  164. scale = Vector2(-1, 1)
  165. sprite_frames = SubResource("SpriteFrames_5qjsg")
  166. animation = &"Hit"
  167. offset = Vector2(-1, 1)
  168. script = ExtResource("2_dd5rd")
  169. do_offset = false
  170. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  171. [node name="ResourceSetterNew" type="Node" parent="ScaleJoint/Sprite/FlashSprite" node_paths=PackedStringArray("node_to_affect")]
  172. script = ExtResource("4_hgi3d")
  173. node_to_affect = NodePath("..")
  174. property_name = "sprite_frames"
  175. resource_json = ExtResource("6_pn2vf")
  176. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  177. [node name="Collision" type="CollisionShape2D" parent="."]
  178. position = Vector2(0, -4)
  179. shape = SubResource("RectangleShape2D_70th7")
  180. [node name="Hitbox" type="Area2D" parent="."]
  181. collision_mask = 5
  182. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  183. position = Vector2(0, -6)
  184. shape = SubResource("RectangleShape2D_hagok")
  185. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  186. script = ExtResource("3_5qjsg")
  187. hitbox = NodePath("../Hitbox")
  188. metadata/_custom_type_script = "uid://chj8hu207lrh"
  189. [node name="Movement" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  190. script = ExtResource("4_70th7")
  191. visuals = NodePath("../ScaleJoint/Sprite")
  192. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  193. script = ExtResource("5_t0tau")
  194. hitbox = NodePath("../Hitbox")
  195. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  196. [node name="ShellDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  197. script = ExtResource("6_j3rs3")
  198. hitbox = NodePath("../Hitbox")
  199. metadata/_custom_type_script = "uid://bbww34oiexbx2"
  200. [node name="BlockBouncingDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  201. script = ExtResource("7_yf454")
  202. detection_type = 1
  203. hitbox = NodePath("../Hitbox")
  204. can_change_direction = true
  205. metadata/_custom_type_script = "uid://cmg61722ktg2m"
  206. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  207. libraries = {
  208. &"": SubResource("AnimationLibrary_ll0jm")
  209. }
  210. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  211. script = ExtResource("9_yf454")
  212. visuals = NodePath("../ScaleJoint/Sprite")
  213. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  214. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  215. position = Vector2(0, -8)
  216. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  217. script = ExtResource("13_tv0mo")
  218. hitbox = NodePath("../Hitbox")
  219. metadata/_custom_type_script = "uid://ba18grqjixded"
  220. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  221. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  222. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="kick"]
  223. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="kick"]
  224. [connection signal="fireball_hit" from="FireballDetection" to="." method="kick"]
  225. [connection signal="moving_shell_entered" from="ShellDetection" to="." method="die_from_object"]
  226. [connection signal="block_bounced" from="BlockBouncingDetection" to="." method="kick"]
  227. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="explode" unbinds=1]