Bowser.tscn 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. [gd_scene load_steps=41 format=3 uid="uid://duptcik2j0b04"]
  2. [ext_resource type="Texture2D" uid="uid://d3sxabber73q6" path="res://Assets/Sprites/Enemies/Bowser.png" id="1_8mi7o"]
  3. [ext_resource type="Script" uid="uid://wtypg4d0l6j2" path="res://Scripts/Classes/Entities/Enemies/Bowser.gd" id="1_ma5fd"]
  4. [ext_resource type="AudioStream" uid="uid://cssh58oe85in8" path="res://Assets/Audio/SFX/BowserFall.wav" id="3_mliv7"]
  5. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="4_2qn7a"]
  6. [ext_resource type="Script" uid="uid://dri2d5jtu0fbq" path="res://Scripts/Classes/Components/FireballDetection.gd" id="4_kfwlq"]
  7. [ext_resource type="Texture2D" uid="uid://3xmhfi556p3s" path="res://Assets/Sprites/Items/Hammer.png" id="4_vubm2"]
  8. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="5_17x2r"]
  9. [ext_resource type="Script" uid="uid://cq6f682453q6o" path="res://Scripts/Classes/Components/ResourceSetter.gd" id="5_v5oyl"]
  10. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/Bowser.json" id="6_nf6hu"]
  11. [ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="6_pvhfi"]
  12. [ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="6_va0n6"]
  13. [ext_resource type="JSON" path="res://Assets/Sprites/Enemies/Goomba.json" id="9_exf4b"]
  14. [ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="11_pvhfi"]
  15. [ext_resource type="Script" uid="uid://cqif1li7otvpl" path="res://Scripts/Parts/SpriteFramesToJsonConverter.gd" id="14_nf6hu"]
  16. [ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="15_nf6hu"]
  17. [ext_resource type="JSON" path="res://Assets/Sprites/Items/Hammer.json" id="15_yggkc"]
  18. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="17_5b235"]
  19. [ext_resource type="Script" uid="uid://bbww34oiexbx2" path="res://Scripts/Classes/Components/ShellDetection.gd" id="19_ymlbw"]
  20. [ext_resource type="Script" uid="uid://chj8hu207lrh" path="res://Scripts/Classes/Components/EnemyPlayerDetection.gd" id="20_ckuah"]
  21. [ext_resource type="Script" uid="uid://ba18grqjixded" path="res://Scripts/Classes/Components/ExplosionDetection.gd" id="21_mcog5"]
  22. [sub_resource type="AtlasTexture" id="AtlasTexture_6fvct"]
  23. atlas = ExtResource("1_8mi7o")
  24. region = Rect2(0, 0, 48, 48)
  25. [sub_resource type="AtlasTexture" id="AtlasTexture_17x2r"]
  26. atlas = ExtResource("1_8mi7o")
  27. region = Rect2(0, 48, 48, 48)
  28. [sub_resource type="AtlasTexture" id="AtlasTexture_nf6hu"]
  29. atlas = ExtResource("1_8mi7o")
  30. region = Rect2(0, 0, 48, 48)
  31. [sub_resource type="AtlasTexture" id="AtlasTexture_exf4b"]
  32. atlas = ExtResource("1_8mi7o")
  33. region = Rect2(48, 0, 48, 48)
  34. [sub_resource type="AtlasTexture" id="AtlasTexture_5b235"]
  35. atlas = ExtResource("1_8mi7o")
  36. region = Rect2(0, 48, 48, 48)
  37. [sub_resource type="AtlasTexture" id="AtlasTexture_yggkc"]
  38. atlas = ExtResource("1_8mi7o")
  39. region = Rect2(48, 48, 48, 48)
  40. [sub_resource type="AtlasTexture" id="AtlasTexture_ymlbw"]
  41. atlas = ExtResource("1_8mi7o")
  42. region = Rect2(0, 0, 48, 48)
  43. [sub_resource type="AtlasTexture" id="AtlasTexture_ckuah"]
  44. atlas = ExtResource("1_8mi7o")
  45. region = Rect2(48, 0, 48, 48)
  46. [sub_resource type="SpriteFrames" id="SpriteFrames_mcog5"]
  47. animations = [{
  48. "frames": [{
  49. "duration": 1.0,
  50. "texture": SubResource("AtlasTexture_6fvct")
  51. }, {
  52. "duration": 1.0,
  53. "texture": SubResource("AtlasTexture_17x2r")
  54. }],
  55. "loop": true,
  56. "name": &"Fall",
  57. "speed": 15.0
  58. }, {
  59. "frames": [{
  60. "duration": 1.0,
  61. "texture": SubResource("AtlasTexture_nf6hu")
  62. }, {
  63. "duration": 1.0,
  64. "texture": SubResource("AtlasTexture_exf4b")
  65. }],
  66. "loop": true,
  67. "name": &"FireBreathe",
  68. "speed": 10.0
  69. }, {
  70. "frames": [{
  71. "duration": 1.0,
  72. "texture": SubResource("AtlasTexture_5b235")
  73. }, {
  74. "duration": 1.0,
  75. "texture": SubResource("AtlasTexture_yggkc")
  76. }],
  77. "loop": true,
  78. "name": &"FireCharge",
  79. "speed": 10.0
  80. }, {
  81. "frames": [{
  82. "duration": 1.0,
  83. "texture": SubResource("AtlasTexture_ymlbw")
  84. }, {
  85. "duration": 1.0,
  86. "texture": SubResource("AtlasTexture_ckuah")
  87. }],
  88. "loop": true,
  89. "name": &"Idle",
  90. "speed": 15.0
  91. }]
  92. [sub_resource type="RectangleShape2D" id="RectangleShape2D_ma5fd"]
  93. size = Vector2(20, 24)
  94. [sub_resource type="Animation" id="Animation_pvhfi"]
  95. resource_name = "Hurt"
  96. length = 0.2
  97. tracks/0/type = "value"
  98. tracks/0/imported = false
  99. tracks/0/enabled = true
  100. tracks/0/path = NodePath("SpriteScaleJoint:scale")
  101. tracks/0/interp = 2
  102. tracks/0/loop_wrap = true
  103. tracks/0/keys = {
  104. "times": PackedFloat32Array(0, 0.2),
  105. "transitions": PackedFloat32Array(1, 1),
  106. "update": 0,
  107. "values": [Vector2(1.2, 1.2), Vector2(1, 1)]
  108. }
  109. tracks/1/type = "value"
  110. tracks/1/imported = false
  111. tracks/1/enabled = true
  112. tracks/1/path = NodePath("SpriteScaleJoint/Sprite/ColorRect:self_modulate")
  113. tracks/1/interp = 2
  114. tracks/1/loop_wrap = true
  115. tracks/1/keys = {
  116. "times": PackedFloat32Array(0, 0.2),
  117. "transitions": PackedFloat32Array(1, 1),
  118. "update": 0,
  119. "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
  120. }
  121. [sub_resource type="Animation" id="Animation_2qn7a"]
  122. length = 0.001
  123. tracks/0/type = "value"
  124. tracks/0/imported = false
  125. tracks/0/enabled = true
  126. tracks/0/path = NodePath("SpriteScaleJoint:scale")
  127. tracks/0/interp = 1
  128. tracks/0/loop_wrap = true
  129. tracks/0/keys = {
  130. "times": PackedFloat32Array(0),
  131. "transitions": PackedFloat32Array(1),
  132. "update": 0,
  133. "values": [Vector2(1, 1)]
  134. }
  135. tracks/1/type = "value"
  136. tracks/1/imported = false
  137. tracks/1/enabled = true
  138. tracks/1/path = NodePath("SpriteScaleJoint/Sprite/ColorRect:self_modulate")
  139. tracks/1/interp = 1
  140. tracks/1/loop_wrap = true
  141. tracks/1/keys = {
  142. "times": PackedFloat32Array(0),
  143. "transitions": PackedFloat32Array(1),
  144. "update": 0,
  145. "values": [Color(1, 1, 1, 0)]
  146. }
  147. [sub_resource type="AnimationLibrary" id="AnimationLibrary_6fvct"]
  148. _data = {
  149. &"Hurt": SubResource("Animation_pvhfi"),
  150. &"RESET": SubResource("Animation_2qn7a")
  151. }
  152. [sub_resource type="SpriteFrames" id="SpriteFrames_ckuah"]
  153. animations = [{
  154. "frames": [],
  155. "loop": true,
  156. "name": &"Idle",
  157. "speed": 5.0
  158. }]
  159. [sub_resource type="RectangleShape2D" id="RectangleShape2D_va0n6"]
  160. size = Vector2(16, 18)
  161. [sub_resource type="Animation" id="Animation_vubm2"]
  162. resource_name = "Move"
  163. length = 1.5
  164. loop_mode = 2
  165. tracks/0/type = "value"
  166. tracks/0/imported = false
  167. tracks/0/enabled = true
  168. tracks/0/path = NodePath("SpriteScaleJoint:position")
  169. tracks/0/interp = 1
  170. tracks/0/loop_wrap = true
  171. tracks/0/keys = {
  172. "times": PackedFloat32Array(0, 1.5),
  173. "transitions": PackedFloat32Array(1, 1),
  174. "update": 0,
  175. "values": [Vector2(-8, -13), Vector2(8, -13)]
  176. }
  177. [sub_resource type="Animation" id="Animation_vgx23"]
  178. length = 0.001
  179. tracks/0/type = "value"
  180. tracks/0/imported = false
  181. tracks/0/enabled = true
  182. tracks/0/path = NodePath("SpriteScaleJoint:position")
  183. tracks/0/interp = 1
  184. tracks/0/loop_wrap = true
  185. tracks/0/keys = {
  186. "times": PackedFloat32Array(0),
  187. "transitions": PackedFloat32Array(1),
  188. "update": 0,
  189. "values": [Vector2(-8, -13)]
  190. }
  191. [sub_resource type="AnimationLibrary" id="AnimationLibrary_v5oyl"]
  192. _data = {
  193. &"Move": SubResource("Animation_vubm2"),
  194. &"RESET": SubResource("Animation_vgx23")
  195. }
  196. [sub_resource type="Resource" id="Resource_5b235"]
  197. script = ExtResource("6_pvhfi")
  198. Overworld = ExtResource("3_mliv7")
  199. metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"
  200. [sub_resource type="Resource" id="Resource_exf4b"]
  201. script = ExtResource("6_pvhfi")
  202. Overworld = SubResource("SpriteFrames_mcog5")
  203. metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"
  204. [node name="Bowser" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Bowser", "Enemies"]]
  205. z_index = 1
  206. collision_layer = 16
  207. collision_mask = 2
  208. script = ExtResource("1_ma5fd")
  209. on_screen_enabler = NodePath("VisibleOnScreenEnabler2D")
  210. score_note_adder = NodePath("ScoreNoteSpawner")
  211. metadata/block_launch_velocity = -50.0
  212. [node name="SpriteScaleJoint" type="Node2D" parent="."]
  213. position = Vector2(-8, -13)
  214. [node name="Sprite" type="AnimatedSprite2D" parent="SpriteScaleJoint"]
  215. clip_children = 2
  216. position = Vector2(0, -11)
  217. scale = Vector2(-1, 1)
  218. sprite_frames = SubResource("SpriteFrames_mcog5")
  219. animation = &"Idle"
  220. autoplay = "Idle"
  221. frame_progress = 0.687669
  222. offset = Vector2(0, 1)
  223. flip_h = true
  224. script = ExtResource("4_2qn7a")
  225. do_offset = false
  226. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  227. [node name="Hitbox" type="Area2D" parent="SpriteScaleJoint/Sprite"]
  228. position = Vector2(0, 24)
  229. rotation = 3.14159
  230. scale = Vector2(1, -1)
  231. [node name="CollisionShape2D" type="CollisionShape2D" parent="SpriteScaleJoint/Sprite/Hitbox"]
  232. visible = false
  233. position = Vector2(0, -12)
  234. shape = SubResource("RectangleShape2D_ma5fd")
  235. [node name="RemoteTransform2D" type="RemoteTransform2D" parent="SpriteScaleJoint/Sprite"]
  236. position = Vector2(8, -8)
  237. rotation = 3.14159
  238. scale = Vector2(1, -1)
  239. remote_path = NodePath("../../../Hammer")
  240. [node name="ResourceSetterNew" type="Node" parent="SpriteScaleJoint/Sprite" node_paths=PackedStringArray("node_to_affect")]
  241. script = ExtResource("5_17x2r")
  242. node_to_affect = NodePath("..")
  243. property_name = "sprite_frames"
  244. resource_json = ExtResource("6_nf6hu")
  245. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  246. [node name="ColorRect" type="ColorRect" parent="SpriteScaleJoint/Sprite"]
  247. modulate = Color(1, 1, 1, 0.552941)
  248. self_modulate = Color(1, 1, 1, 0)
  249. offset_left = -35.1663
  250. offset_top = -22.0
  251. offset_right = 28.8337
  252. offset_bottom = 42.0
  253. color = Color(1, 0, 0, 1)
  254. [node name="HurtAnimation" type="AnimationPlayer" parent="SpriteScaleJoint"]
  255. root_node = NodePath("../..")
  256. libraries = {
  257. &"": SubResource("AnimationLibrary_6fvct")
  258. }
  259. [node name="DeathSprite" type="AnimatedSprite2D" parent="SpriteScaleJoint"]
  260. visible = false
  261. position = Vector2(8, 5)
  262. sprite_frames = SubResource("SpriteFrames_ckuah")
  263. animation = &"Idle"
  264. script = ExtResource("4_2qn7a")
  265. do_offset = false
  266. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  267. [node name="ResourceSetterNew" type="Node" parent="SpriteScaleJoint/DeathSprite" node_paths=PackedStringArray("node_to_affect")]
  268. script = ExtResource("5_17x2r")
  269. node_to_affect = NodePath("..")
  270. property_name = "sprite_frames"
  271. resource_json = ExtResource("9_exf4b")
  272. use_cache = false
  273. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  274. [node name="Collision" type="CollisionShape2D" parent="."]
  275. visible = false
  276. position = Vector2(0, -9)
  277. shape = SubResource("RectangleShape2D_va0n6")
  278. [node name="MoveAnimation" type="AnimationPlayer" parent="."]
  279. libraries = {
  280. &"": SubResource("AnimationLibrary_v5oyl")
  281. }
  282. autoplay = "Move"
  283. [node name="JumpTimer" type="Timer" parent="."]
  284. one_shot = true
  285. [node name="HammerTime" type="Timer" parent="."]
  286. one_shot = true
  287. [node name="FlameTimer" type="Timer" parent="."]
  288. wait_time = 0.5
  289. one_shot = true
  290. [node name="FallSFX" type="AudioStreamPlayer2D" parent="."]
  291. stream = ExtResource("3_mliv7")
  292. bus = &"SFX"
  293. [node name="ResourceSetter" type="Node" parent="FallSFX" node_paths=PackedStringArray("node_to_affect")]
  294. script = ExtResource("5_v5oyl")
  295. node_to_affect = NodePath("..")
  296. property_name = "stream"
  297. themed_resource = SubResource("Resource_5b235")
  298. metadata/_custom_type_script = "uid://cq6f682453q6o"
  299. [node name="FireballDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  300. script = ExtResource("4_kfwlq")
  301. hitbox = NodePath("../SpriteScaleJoint/Sprite/Hitbox")
  302. metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
  303. [node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
  304. script = ExtResource("6_va0n6")
  305. visuals = NodePath("../SpriteScaleJoint/DeathSprite")
  306. metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
  307. [node name="ScoreNoteSpawner" type="Node" parent="."]
  308. script = ExtResource("11_pvhfi")
  309. add_score = true
  310. metadata/_custom_type_script = "uid://5octqlf4ohel"
  311. [node name="Hammer" type="Sprite2D" parent="."]
  312. visible = false
  313. show_behind_parent = true
  314. position = Vector2(-16, -32)
  315. texture = ExtResource("4_vubm2")
  316. region_enabled = true
  317. region_rect = Rect2(0, 0, 16, 16)
  318. [node name="ResourceSetter" type="Node" parent="Hammer" node_paths=PackedStringArray("node_to_affect", "property_node")]
  319. script = ExtResource("5_17x2r")
  320. node_to_affect = NodePath("..")
  321. property_node = NodePath("..")
  322. property_name = "texture"
  323. mode = 1
  324. resource_json = ExtResource("15_yggkc")
  325. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  326. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  327. self_modulate = Color(1, 1, 1, 0)
  328. position = Vector2(-1.42109e-14, -16)
  329. scale = Vector2(1.85, 2.1)
  330. [node name="ThemedToJSONConverter" type="Node" parent="."]
  331. script = ExtResource("14_nf6hu")
  332. resource = SubResource("Resource_exf4b")
  333. json_file_path = "res://Assets/Sprites/Enemies/Bowser.json"
  334. metadata/_custom_type_script = "uid://cqif1li7otvpl"
  335. [node name="EditorPropertyExposer" type="Node" parent="."]
  336. script = ExtResource("15_nf6hu")
  337. properties = Array[String](["can_hammer", "can_fire"])
  338. [node name="TrackJoint" type="Node" parent="."]
  339. script = ExtResource("17_5b235")
  340. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  341. [node name="ShellDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  342. script = ExtResource("19_ymlbw")
  343. hitbox = NodePath("../SpriteScaleJoint/Sprite/Hitbox")
  344. metadata/_custom_type_script = "uid://bbww34oiexbx2"
  345. [node name="EnemyPlayerDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  346. script = ExtResource("20_ckuah")
  347. hitbox = NodePath("../SpriteScaleJoint/Sprite/Hitbox")
  348. metadata/_custom_type_script = "uid://chj8hu207lrh"
  349. [node name="ExplosionDetection" type="Node" parent="." node_paths=PackedStringArray("hitbox")]
  350. script = ExtResource("21_mcog5")
  351. hitbox = NodePath("../SpriteScaleJoint/Sprite/Hitbox")
  352. metadata/_custom_type_script = "uid://ba18grqjixded"
  353. [connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
  354. [connection signal="killed" from="." to="ScoreNoteSpawner" method="spawn_note" binds= [5000]]
  355. [connection signal="killed" from="." to="." method="show_smoke" unbinds=1]
  356. [connection signal="area_entered" from="SpriteScaleJoint/Sprite/Hitbox" to="." method="on_area_entered"]
  357. [connection signal="timeout" from="JumpTimer" to="." method="jump"]
  358. [connection signal="timeout" from="HammerTime" to="." method="throw_hammers"]
  359. [connection signal="timeout" from="FlameTimer" to="." method="breathe_fire"]
  360. [connection signal="fireball_hit" from="FireballDetection" to="." method="fireball_hit" unbinds=1]
  361. [connection signal="screen_entered" from="VisibleOnScreenEnabler2D" to="." method="play_music" flags=6]
  362. [connection signal="attached" from="TrackJoint" to="MoveAnimation" method="play" binds= ["RESET"]]
  363. [connection signal="moving_shell_entered" from="ShellDetection" to="ShellDetection" method="destroy_shell"]
  364. [connection signal="moving_shell_entered" from="ShellDetection" to="." method="fireball_hit" unbinds=1]
  365. [connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
  366. [connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
  367. [connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="damage_player"]
  368. [connection signal="explosion_entered" from="ExplosionDetection" to="." method="fireball_hit" unbinds=1]