BowserFlame.tscn 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [gd_scene load_steps=10 format=3 uid="uid://blbarreyjem4l"]
  2. [ext_resource type="Texture2D" uid="uid://t5lgshoxlohe" path="res://Assets/Sprites/Items/BowserFlame.png" id="1_4hwux"]
  3. [ext_resource type="Script" uid="uid://btstbvjk6e6aw" path="res://Scripts/Classes/Entities/Enemies/BowserFlame.gd" id="1_dq7qg"]
  4. [ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="3_ktnk0"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="4_ktnk0"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Items/BowserFlame.json" id="5_0e5kh"]
  7. [sub_resource type="AtlasTexture" id="AtlasTexture_iikig"]
  8. atlas = ExtResource("1_4hwux")
  9. region = Rect2(0, 0, 24, 16)
  10. [sub_resource type="AtlasTexture" id="AtlasTexture_jqext"]
  11. atlas = ExtResource("1_4hwux")
  12. region = Rect2(24, 0, 24, 16)
  13. [sub_resource type="SpriteFrames" id="SpriteFrames_oy8b6"]
  14. animations = [{
  15. "frames": [{
  16. "duration": 1.0,
  17. "texture": SubResource("AtlasTexture_iikig")
  18. }, {
  19. "duration": 1.0,
  20. "texture": SubResource("AtlasTexture_jqext")
  21. }],
  22. "loop": true,
  23. "name": &"default",
  24. "speed": 15.0
  25. }]
  26. [sub_resource type="RectangleShape2D" id="RectangleShape2D_ohhuu"]
  27. size = Vector2(12, 4)
  28. [node name="BowserFlame" type="Node2D" groups=["Enemies"]]
  29. script = ExtResource("1_dq7qg")
  30. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  31. scale = Vector2(-1, 1)
  32. sprite_frames = SubResource("SpriteFrames_oy8b6")
  33. autoplay = "default"
  34. frame_progress = 0.67141116
  35. flip_h = true
  36. script = ExtResource("3_ktnk0")
  37. do_offset = false
  38. metadata/_custom_type_script = "uid://caq1qiwmy0mox"
  39. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  40. script = ExtResource("4_ktnk0")
  41. node_to_affect = NodePath("..")
  42. property_name = "sprite_frames"
  43. resource_json = ExtResource("5_0e5kh")
  44. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  45. [node name="Hitbox" type="Area2D" parent="."]
  46. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  47. shape = SubResource("RectangleShape2D_ohhuu")
  48. [node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
  49. position = Vector2(-2.38419e-07, 0)
  50. scale = Vector2(1.6, 1)
  51. [connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]
  52. [connection signal="screen_entered" from="VisibleOnScreenEnabler2D" to="." method="play_sfx"]
  53. [connection signal="screen_exited" from="VisibleOnScreenEnabler2D" to="." method="queue_free"]