Files
Super-Mario-Bros.-Remastere…/Scenes/Prefabs/LevelObjects/EditorLinkedElevator.tscn
2025-09-13 16:30:32 +01:00

95 lines
3.7 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://bhqyp8mia3mo3"]
[ext_resource type="Script" uid="uid://duxduhxe8vqdo" path="res://Scripts/Classes/Entities/Objects/EditorLinkedElevator.gd" id="1_0yjq3"]
[ext_resource type="Texture2D" uid="uid://dt0qtxu2l646n" path="res://Assets/Sprites/Tilesets/Terrain/Overworld.png" id="2_lcqnt"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_5tm0t"]
[ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Terrain/TerrainTiles.json" id="4_ohybb"]
[ext_resource type="PackedScene" uid="uid://6rp3wgax4i51" path="res://Scenes/Prefabs/Entities/Objects/RopeElevatorPlatform.tscn" id="5_5qwbh"]
[ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="6_lcqnt"]
[sub_resource type="GDScript" id="GDScript_0yjq3"]
script/source = "extends Node
func _process(_delta: float) -> void:
if LevelEditor.playing_level == false:
update()
func update() -> void:
$\"../CornerR\".position.x = (16 * owner.width) + 48
$\"../Middle\".size.x = (owner.width * 16) + 32
%RPlatform.position.y = (16 * owner.right_height) + 16
%LPlatform.position.y = (16 * owner.left_height) + 16
%LPlatform.rope_top = owner.global_position.y
%RPlatform.rope_top = owner.global_position.y
%RPlatform._process(-1)
%LPlatform._process(-1)
"
[node name="EditorLinkedElevator" type="Node2D"]
script = ExtResource("1_0yjq3")
[node name="CornerL" type="Sprite2D" parent="."]
texture = ExtResource("2_lcqnt")
region_enabled = true
region_rect = Rect2(160, 128, 16, 16)
[node name="ResourceSetterNew" type="Node" parent="CornerL" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_5tm0t")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_ohybb")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="Middle" type="NinePatchRect" parent="."]
offset_left = 8.0
offset_top = -8.0
offset_right = 48.0
offset_bottom = 8.0
texture = ExtResource("2_lcqnt")
region_rect = Rect2(176, 128, 16, 16)
axis_stretch_horizontal = 1
[node name="ResourceSetterNew" type="Node" parent="Middle" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_5tm0t")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_ohybb")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="CornerR" type="Sprite2D" parent="."]
position = Vector2(56, 0)
texture = ExtResource("2_lcqnt")
region_enabled = true
region_rect = Rect2(192, 128, 16, 16)
[node name="ResourceSetterNew" type="Node" parent="CornerR" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_5tm0t")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_ohybb")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="RPlatform" parent="CornerR" node_paths=PackedStringArray("linked_platform") instance=ExtResource("5_5qwbh")]
unique_name_in_owner = true
position = Vector2(0, 16)
linked_platform = NodePath("../../LPlatform")
[node name="LPlatform" parent="." node_paths=PackedStringArray("linked_platform") instance=ExtResource("5_5qwbh")]
unique_name_in_owner = true
position = Vector2(0, 64)
linked_platform = NodePath("../CornerR/RPlatform")
[node name="EditorPropertyExposer" type="Node" parent="."]
script = ExtResource("6_lcqnt")
properties = Array[String](["width", "left_height", "right_height"])
metadata/_custom_type_script = "uid://ctfbuoxtnnl0q"
[node name="Node" type="Node" parent="."]
process_mode = 3
script = SubResource("GDScript_0yjq3")
[connection signal="modifier_applied" from="EditorPropertyExposer" to="Node" method="update"]