FallingPlatform.tscn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [gd_scene load_steps=9 format=3 uid="uid://bm8obwlkm56wb"]
  2. [ext_resource type="Script" uid="uid://c4m157i8p54cf" path="res://Scripts/Classes/Entities/Objects/FallingPlatform.gd" id="1_krw4p"]
  3. [ext_resource type="Texture2D" uid="uid://bk0p52ttwojml" path="res://Assets/Sprites/Tilesets/Platform.png" id="2_p76vr"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_r8wfm"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Platform.json" id="4_odngu"]
  6. [ext_resource type="Script" uid="uid://cpwloakvp672a" path="res://Scripts/Parts/EditorVisibleNode.gd" id="5_c36tx"]
  7. [ext_resource type="Texture2D" uid="uid://cke2nve5v64am" path="res://Assets/Sprites/Editor/PlatformIcons/Falling.png" id="6_klq8y"]
  8. [sub_resource type="RectangleShape2D" id="RectangleShape2D_r8wfm"]
  9. size = Vector2(32, 8)
  10. [sub_resource type="RectangleShape2D" id="RectangleShape2D_c36tx"]
  11. size = Vector2(36, 10)
  12. [node name="FallingPlatform" type="AnimatableBody2D"]
  13. script = ExtResource("1_krw4p")
  14. [node name="TextureRect" type="NinePatchRect" parent="."]
  15. offset_left = -16.0
  16. offset_right = 16.0
  17. offset_bottom = 8.0
  18. texture = ExtResource("2_p76vr")
  19. patch_margin_left = 8
  20. patch_margin_right = 8
  21. axis_stretch_horizontal = 1
  22. [node name="ResourceSetter" type="Node" parent="TextureRect" node_paths=PackedStringArray("node_to_affect")]
  23. script = ExtResource("3_r8wfm")
  24. node_to_affect = NodePath("..")
  25. property_name = "texture"
  26. mode = 1
  27. resource_json = ExtResource("4_odngu")
  28. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  29. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  30. position = Vector2(0, 4)
  31. shape = SubResource("RectangleShape2D_r8wfm")
  32. [node name="PlayerDetect" type="Area2D" parent="."]
  33. [node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerDetect"]
  34. position = Vector2(0, 3)
  35. shape = SubResource("RectangleShape2D_c36tx")
  36. one_way_collision = true
  37. [node name="LevelEditorVisibleNode" type="Node2D" parent="."]
  38. visibility_layer = 2
  39. script = ExtResource("5_c36tx")
  40. metadata/_custom_type_script = "uid://cpwloakvp672a"
  41. [node name="Sprite2D" type="Sprite2D" parent="LevelEditorVisibleNode"]
  42. position = Vector2(8, 8)
  43. texture = ExtResource("6_klq8y")