mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Elevator Proxies
This commit is contained in:
parent
cb60226ced
commit
41ba7affc5
5 changed files with 967 additions and 925 deletions
File diff suppressed because one or more lines are too long
45
3D/Scenes/Props/Elevator_Path_3D.tscn
Normal file
45
3D/Scenes/Props/Elevator_Path_3D.tscn
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://b3io3bage2qyb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2fm2civ8ihgs" path="res://Scripts/Actors/ElevatorProxy3D.cs" id="1_buenw"]
|
||||
[ext_resource type="Script" uid="uid://cyr7ypanl8drq" path="res://Scripts/Actors/Elevator3D.cs" id="1_sjscu"]
|
||||
[ext_resource type="PackedScene" uid="uid://cq6tw87ei4by3" path="res://3D/Scenes/Props/elevator_3d.tscn" id="2_buenw"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhh7qq1plw53i" path="res://Scenes/Interactable/AreaTrigger3D.tscn" id="3_tekpv"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_buenw"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.5, 0),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_buenw"]
|
||||
height = 0.342773
|
||||
|
||||
[node name="Elevator" type="Path3D" node_paths=PackedStringArray("Elevator")]
|
||||
curve = SubResource("Curve3D_buenw")
|
||||
script = ExtResource("1_buenw")
|
||||
Elevator = NodePath("PathFollow3D")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0)
|
||||
h_offset = 0.5
|
||||
rotation_mode = 0
|
||||
loop = false
|
||||
script = ExtResource("1_sjscu")
|
||||
Speed = 1.0
|
||||
|
||||
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="PathFollow3D"]
|
||||
remote_path = NodePath("../../Elevator")
|
||||
update_rotation = false
|
||||
update_scale = false
|
||||
|
||||
[node name="Elevator" parent="." instance=ExtResource("2_buenw")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0)
|
||||
|
||||
[node name="AreaTrigger3d" parent="Elevator" node_paths=PackedStringArray("Target") instance=ExtResource("3_tekpv")]
|
||||
Target = NodePath("../../PathFollow3D")
|
||||
OneTime = false
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="Elevator/AreaTrigger3d"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.23584, 0)
|
||||
shape = SubResource("CylinderShape3D_buenw")
|
||||
13
Scripts/Actors/ElevatorProxy3D.cs
Normal file
13
Scripts/Actors/ElevatorProxy3D.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
public partial class ElevatorProxy3D : Path3D, IActivable
|
||||
{
|
||||
[Export] public Elevator3D Elevator { get; private set; }
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
return Elevator.Activate(activationType);
|
||||
}
|
||||
|
||||
}
|
||||
1
Scripts/Actors/ElevatorProxy3D.cs.uid
Normal file
1
Scripts/Actors/ElevatorProxy3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://2fm2civ8ihgs
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
[resource]
|
||||
albedo_texture = ExtResource("1_bnsbx")
|
||||
metallic_specular = 0.0
|
||||
heightmap_enabled = true
|
||||
heightmap_texture = ExtResource("2_qk23j")
|
||||
heightmap_flip_texture = true
|
||||
texture_filter = 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue