PipeGenerator.tscn 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. [gd_scene load_steps=12 format=3 uid="uid://da31n0jwfyjo0"]
  2. [ext_resource type="Script" uid="uid://cpwloakvp672a" path="res://Scripts/Parts/EditorVisibleNode.gd" id="1_4di0c"]
  3. [ext_resource type="Script" uid="uid://omwcucf0uvvj" path="res://Scripts/Parts/PipeGenerator.gd" id="1_amwyv"]
  4. [ext_resource type="Texture2D" uid="uid://dtx6lbaom4qld" path="res://Assets/Sprites/Editor/PipeGenerator.png" id="2_amwyv"]
  5. [ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="4_f1jdk"]
  6. [ext_resource type="Texture2D" uid="uid://dlldh5aks0wff" path="res://Assets/Sprites/Editor/GhostTile.png" id="4_xu70c"]
  7. [sub_resource type="Animation" id="Animation_xu70c"]
  8. resource_name = "Down"
  9. length = 0.5
  10. tracks/0/type = "value"
  11. tracks/0/imported = false
  12. tracks/0/enabled = true
  13. tracks/0/path = NodePath("Joint:position")
  14. tracks/0/interp = 1
  15. tracks/0/loop_wrap = true
  16. tracks/0/keys = {
  17. "times": PackedFloat32Array(0, 0.5),
  18. "transitions": PackedFloat32Array(1, 1),
  19. "update": 0,
  20. "values": [Vector2(0, 16), Vector2(0, 0)]
  21. }
  22. [sub_resource type="Animation" id="Animation_a0wqs"]
  23. resource_name = "Left"
  24. length = 0.5
  25. tracks/0/type = "value"
  26. tracks/0/imported = false
  27. tracks/0/enabled = true
  28. tracks/0/path = NodePath("Joint:position")
  29. tracks/0/interp = 1
  30. tracks/0/loop_wrap = true
  31. tracks/0/keys = {
  32. "times": PackedFloat32Array(0, 0.5),
  33. "transitions": PackedFloat32Array(1, 1),
  34. "update": 0,
  35. "values": [Vector2(-16, 0), Vector2(0, 0)]
  36. }
  37. [sub_resource type="Animation" id="Animation_f1jdk"]
  38. length = 0.001
  39. tracks/0/type = "value"
  40. tracks/0/imported = false
  41. tracks/0/enabled = true
  42. tracks/0/path = NodePath("Joint:position")
  43. tracks/0/interp = 1
  44. tracks/0/loop_wrap = true
  45. tracks/0/keys = {
  46. "times": PackedFloat32Array(0),
  47. "transitions": PackedFloat32Array(1),
  48. "update": 0,
  49. "values": [Vector2(0, 0)]
  50. }
  51. [sub_resource type="Animation" id="Animation_6pkd4"]
  52. resource_name = "Right"
  53. length = 0.5
  54. tracks/0/type = "value"
  55. tracks/0/imported = false
  56. tracks/0/enabled = true
  57. tracks/0/path = NodePath("Joint:position")
  58. tracks/0/interp = 1
  59. tracks/0/loop_wrap = true
  60. tracks/0/keys = {
  61. "times": PackedFloat32Array(0, 0.5),
  62. "transitions": PackedFloat32Array(1, 1),
  63. "update": 0,
  64. "values": [Vector2(16, 0), Vector2(0, 0)]
  65. }
  66. [sub_resource type="Animation" id="Animation_amwyv"]
  67. resource_name = "Up"
  68. length = 0.5
  69. tracks/0/type = "value"
  70. tracks/0/imported = false
  71. tracks/0/enabled = true
  72. tracks/0/path = NodePath("Joint:position")
  73. tracks/0/interp = 1
  74. tracks/0/loop_wrap = true
  75. tracks/0/keys = {
  76. "times": PackedFloat32Array(0, 0.5),
  77. "transitions": PackedFloat32Array(1, 1),
  78. "update": 0,
  79. "values": [Vector2(0, -16), Vector2(0, 0)]
  80. }
  81. [sub_resource type="AnimationLibrary" id="AnimationLibrary_6pkd4"]
  82. _data = {
  83. &"Down": SubResource("Animation_xu70c"),
  84. &"Left": SubResource("Animation_a0wqs"),
  85. &"RESET": SubResource("Animation_f1jdk"),
  86. &"Right": SubResource("Animation_6pkd4"),
  87. &"Up": SubResource("Animation_amwyv")
  88. }
  89. [node name="PipeGenerator" type="Node2D"]
  90. script = ExtResource("1_amwyv")
  91. [node name="Icon" type="Node2D" parent="."]
  92. z_index = 50
  93. z_as_relative = false
  94. script = ExtResource("1_4di0c")
  95. [node name="Sprite2D" type="Sprite2D" parent="Icon"]
  96. texture = ExtResource("2_amwyv")
  97. [node name="ColorRect" type="TextureRect" parent="Icon"]
  98. offset_left = -16.0
  99. offset_bottom = 16.0
  100. texture = ExtResource("4_xu70c")
  101. [node name="Joint" type="RemoteTransform2D" parent="."]
  102. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  103. libraries = {
  104. &"": SubResource("AnimationLibrary_6pkd4")
  105. }
  106. [node name="Timer" type="Timer" parent="."]
  107. wait_time = 3.0
  108. [node name="EditorPropertyExposer" type="Node" parent="."]
  109. script = ExtResource("4_f1jdk")
  110. properties = Array[String](["item", "direction"])
  111. filters = Dictionary[String, String]({
  112. "item": "can_be_stored"
  113. })
  114. [node name="Check" type="RayCast2D" parent="."]
  115. target_position = Vector2(0, 16)
  116. collision_mask = 6
  117. hit_from_inside = true
  118. [connection signal="timeout" from="Timer" to="." method="on_timeout"]