TurnBlock.tscn 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [gd_scene load_steps=15 format=3 uid="uid://bn651dli8j2rj"]
  2. [ext_resource type="Script" uid="uid://dm44kedpj4m80" path="res://Scripts/Classes/Blocks/TurnBlock.gd" id="1_keywi"]
  3. [ext_resource type="Texture2D" uid="uid://btt618edhifoj" path="res://Assets/Sprites/Blocks/TurnBlock.png" id="2_2j2lx"]
  4. [ext_resource type="PackedScene" uid="uid://fqeqexyd7j0j" path="res://Scenes/Prefabs/Particles/TurnBlockDestructionParticles.tscn" id="2_rlxbk"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_wx1p4"]
  6. [ext_resource type="JSON" path="res://Assets/Sprites/Blocks/TurnBlock.json" id="4_keywi"]
  7. [ext_resource type="PackedScene" uid="uid://cijkvfkthetn5" path="res://Scenes/Parts/BlockAnimations.tscn" id="5_xbwt3"]
  8. [ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="6_2qcru"]
  9. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="7_2j2lx"]
  10. [sub_resource type="AtlasTexture" id="AtlasTexture_8yy4r"]
  11. atlas = ExtResource("2_2j2lx")
  12. region = Rect2(0, 0, 16, 16)
  13. [sub_resource type="AtlasTexture" id="AtlasTexture_pm24u"]
  14. atlas = ExtResource("2_2j2lx")
  15. region = Rect2(16, 0, 16, 16)
  16. [sub_resource type="AtlasTexture" id="AtlasTexture_keywi"]
  17. atlas = ExtResource("2_2j2lx")
  18. region = Rect2(32, 0, 16, 16)
  19. [sub_resource type="AtlasTexture" id="AtlasTexture_2j2lx"]
  20. atlas = ExtResource("2_2j2lx")
  21. region = Rect2(48, 0, 16, 16)
  22. [sub_resource type="SpriteFrames" id="SpriteFrames_rlxbk"]
  23. animations = [{
  24. "frames": [{
  25. "duration": 1.0,
  26. "texture": SubResource("AtlasTexture_8yy4r")
  27. }, {
  28. "duration": 1.0,
  29. "texture": SubResource("AtlasTexture_pm24u")
  30. }, {
  31. "duration": 1.0,
  32. "texture": SubResource("AtlasTexture_keywi")
  33. }, {
  34. "duration": 1.0,
  35. "texture": SubResource("AtlasTexture_2j2lx")
  36. }],
  37. "loop": true,
  38. "name": &"default",
  39. "speed": 10.0
  40. }]
  41. [sub_resource type="RectangleShape2D" id="RectangleShape2D_b3g5f"]
  42. size = Vector2(16, 16)
  43. [node name="TurnBlock" type="AnimatableBody2D" node_paths=PackedStringArray("visuals") groups=["Blocks"]]
  44. z_index = -1
  45. collision_layer = 6
  46. collision_mask = 0
  47. script = ExtResource("1_keywi")
  48. visuals = NodePath("Sprite")
  49. destruction_particle_scene = ExtResource("2_rlxbk")
  50. metadata/_custom_type_script = "uid://b5ejlbl0vp1gm"
  51. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  52. sprite_frames = SubResource("SpriteFrames_rlxbk")
  53. speed_scale = 0.0
  54. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  55. script = ExtResource("3_wx1p4")
  56. node_to_affect = NodePath("..")
  57. property_name = "sprite_frames"
  58. resource_json = ExtResource("4_keywi")
  59. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  60. [node name="Collision" type="CollisionShape2D" parent="."]
  61. visible = false
  62. shape = SubResource("RectangleShape2D_b3g5f")
  63. [node name="BlockAnimations" parent="." instance=ExtResource("5_xbwt3")]
  64. [node name="EditorPropertyExposer" type="Node" parent="."]
  65. script = ExtResource("6_2qcru")
  66. properties = Array[String](["item", "item_amount", "mushroom_if_small"])
  67. filters = Dictionary[String, String]({
  68. "item": "can_be_stored"
  69. })
  70. [node name="TrackJoint" type="Node" parent="."]
  71. script = ExtResource("7_2j2lx")
  72. offset = Vector2(0, 0)
  73. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  74. [connection signal="player_block_hit" from="." to="." method="on_block_hit"]
  75. [connection signal="player_block_hit" from="." to="BlockAnimations" method="bounce_block" unbinds=1]
  76. [connection signal="shell_block_hit" from="." to="." method="on_shell_block_hit"]
  77. [connection signal="shell_block_hit" from="." to="BlockAnimations" method="bounce_block" unbinds=1]