列车动画调整:进站缓入,出站由慢到快

This commit is contained in:
joylink_zhaoerwei 2024-05-22 16:02:05 +08:00
parent f3c971ad5b
commit 2e92e9e1fa
3 changed files with 14 additions and 13 deletions

View File

@ -4,8 +4,9 @@ class_name TotalScene
##车来且开屏蔽门和车门
func trainComeAndOpenScreenDoor ()-> void:
$train.trainCome()
$BeginTimer.start()
if $platform.allScreenDoorClose() :
$train.trainCome()
$BeginTimer.start()
func _on_beginTimer_timeout() -> void:
$train.openLeftTrainDoorALL()

View File

@ -23,7 +23,7 @@ tracks/0/keys = {
[sub_resource type="Animation" id="Animation_he04d"]
resource_name = "trainCome"
length = 2.0
length = 4.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -31,15 +31,15 @@ tracks/0/path = NodePath("../train:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 2),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0, 4),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(20, 0, 0), Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_fssoy"]
resource_name = "trainLeave"
length = 15.0
length = 10.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -47,8 +47,8 @@ tracks/0/path = NodePath("../train:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 15),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0, 10),
"transitions": PackedFloat32Array(2, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(-120, 0, 0)]
}
@ -86,7 +86,7 @@ libraries = {
}
[node name="BeginTimer" type="Timer" parent="."]
wait_time = 5.0
wait_time = 6.0
one_shot = true
[node name="EndTimer" type="Timer" parent="."]

View File

@ -16,7 +16,7 @@ var handleStep = [
"play": false,
"playPath": "",
"stepTip": true,
"checkVoice": ""
"checkVoice": "上行3号门门头灯不亮开门故障。"
},
{
"stepName": "现场处置 步骤一站务员用对讲机汇报值班员值班员上行3号门开门故障使用LCB开启站台门。",
@ -177,17 +177,17 @@ func _on_total_screen_door_open_confirm_signal(screenDoor):
handleStepIndex = 0
nextStep()
elif screenDoor.name == "screenDoor3":
handleStepIndex = 5
handleStepIndex = 4
nextStep()
##关门信号
func _on_total_screen_door_close_confirm_signal(screenDoor):
if screenDoor.name == "screenDoor3":
$total.trainLeave()
handleStepIndex = 7
handleStepIndex = 6
nextStep()
elif screenDoor.name == "screenDoor1":
handleStepIndex = 6
handleStepIndex = 5
nextStep()