interaction
This commit is contained in:
parent
5e20eeb8bf
commit
d98eb6335f
13 changed files with 145 additions and 24 deletions
91
scenes/flask.tscn
Normal file
91
scenes/flask.tscn
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://bjxjcx2qu16q5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_0xufn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_h7awq"]
|
||||
[ext_resource type="Script" uid="uid://mjx50qh1bwv3" path="res://src/interactible/interaction_reciever.gd" id="3_ailwx"]
|
||||
[ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="4_kkw7a"]
|
||||
[ext_resource type="Script" uid="uid://e8xu57ewvb5a" path="res://src/interactible/proximity_rotator.gd" id="5_rqua0"]
|
||||
[ext_resource type="Script" uid="uid://dteb2xxl8gixp" path="res://src/ui/slider_display.gd" id="6_wadb5"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"]
|
||||
radius = 0.1
|
||||
height = 0.9921875
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_0xufn"]
|
||||
height = 0.16210938
|
||||
radius = 0.625
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_vcwhe"]
|
||||
radius = 0.49649125
|
||||
|
||||
[sub_resource type="Curve" id="Curve_qb0nw"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.067761436, 0, 0, Vector2(0.75, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[node name="Flask" type="Area3D"]
|
||||
script = ExtResource("1_0xufn")
|
||||
|
||||
[node name="DragArea" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_vcwhe")
|
||||
|
||||
[node name="FlaskNew" parent="." instance=ExtResource("2_h7awq")]
|
||||
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, -0.38859487, 0)
|
||||
|
||||
[node name="InteractibleArea" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6011598, 0)
|
||||
collision_layer = 6
|
||||
collision_mask = 0
|
||||
script = ExtResource("3_ailwx")
|
||||
metadata/_custom_type_script = "uid://mjx50qh1bwv3"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractibleArea"]
|
||||
shape = SubResource("CylinderShape3D_0xufn")
|
||||
|
||||
[node name="InteractionArea" type="Area3D" parent="." node_paths=PackedStringArray("interaction_dialog")]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
input_ray_pickable = false
|
||||
script = ExtResource("4_kkw7a")
|
||||
interaction_dialog = NodePath("../InteractionDialog")
|
||||
|
||||
[node name="InteractionArea" type="CollisionShape3D" parent="InteractionArea"]
|
||||
shape = SubResource("SphereShape3D_vcwhe")
|
||||
|
||||
[node name="ProximityRotator" type="Node" parent="." node_paths=PackedStringArray("rotated")]
|
||||
script = ExtResource("5_rqua0")
|
||||
rotated = NodePath("..")
|
||||
proximity_radius = 0.1
|
||||
modification_curve = SubResource("Curve_qb0nw")
|
||||
|
||||
[node name="InteractionDialog" type="ConfirmationDialog" parent="."]
|
||||
oversampling_override = 1.0
|
||||
position = Vector2i(0, 36)
|
||||
size = Vector2i(200, 131)
|
||||
borderless = true
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="InteractionDialog"]
|
||||
offset_left = 8.0
|
||||
offset_top = 8.0
|
||||
offset_right = 192.0
|
||||
offset_bottom = 82.0
|
||||
|
||||
[node name="Label" type="Label" parent="InteractionDialog/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Введите количество"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="InteractionDialog/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AmountLabel" type="Label" parent="InteractionDialog/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("slider")]
|
||||
layout_mode = 2
|
||||
script = ExtResource("6_wadb5")
|
||||
slider = NodePath("../HSlider")
|
||||
suffix = "%"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="InteractionDialog/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"]
|
||||
[connection signal="interaction_reciever_entered" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_entered"]
|
||||
[connection signal="interaction_reciever_exited" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_exited"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue