语音提示暂提
This commit is contained in:
parent
aad74312e6
commit
9b9135b073
BIN
Assets/training_speech/gmgz/2hmgmgz.mp3
Normal file
BIN
Assets/training_speech/gmgz/2hmgmgz.mp3
Normal file
Binary file not shown.
19
Assets/training_speech/gmgz/2hmgmgz.mp3.import
Normal file
19
Assets/training_speech/gmgz/2hmgmgz.mp3.import
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://ch844lptcf1d4"
|
||||||
|
path="res://.godot/imported/2hmgmgz.mp3-e53057236583099f00476818ff341eec.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/training_speech/gmgz/2hmgmgz.mp3"
|
||||||
|
dest_files=["res://.godot/imported/2hmgmgz.mp3-e53057236583099f00476818ff341eec.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
@ -17,7 +17,15 @@ func _on_training_desc_dialog_start_training():
|
|||||||
$DepartTimer.one_shot = true
|
$DepartTimer.one_shot = true
|
||||||
$DepartTimer.connect("timeout", depart)
|
$DepartTimer.connect("timeout", depart)
|
||||||
$DepartTimer.start()
|
$DepartTimer.start()
|
||||||
|
var sound = load_mp3("res://Assets/training_speech/gmgz/2hmgmgz.mp3")
|
||||||
|
$VoiceCommunication.play_reply(sound)
|
||||||
|
|
||||||
func depart():
|
func depart():
|
||||||
$total.closeScreenDoor()
|
$total.closeScreenDoor()
|
||||||
|
|
||||||
|
|
||||||
|
func load_mp3(path):
|
||||||
|
var file = FileAccess.open(path, FileAccess.READ)
|
||||||
|
var sound = AudioStreamMP3.new()
|
||||||
|
sound.data = file.get_buffer(file.get_length())
|
||||||
|
return sound
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://b5yffodicwqm4"]
|
[gd_scene load_steps=5 format=3 uid="uid://b5yffodicwqm4"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://qh8b3g6n3k2u" path="res://trainings/training_desc_dialog.tscn" id="1_efkp6"]
|
[ext_resource type="PackedScene" uid="uid://qh8b3g6n3k2u" path="res://trainings/training_desc_dialog.tscn" id="1_efkp6"]
|
||||||
[ext_resource type="Script" path="res://trainings/trainingCloseDoorFault/trainingCloseDoorFault.gd" id="1_iggb0"]
|
[ext_resource type="Script" path="res://trainings/trainingCloseDoorFault/trainingCloseDoorFault.gd" id="1_iggb0"]
|
||||||
[ext_resource type="PackedScene" uid="uid://btcksdsburk7t" path="res://sceen/total.tscn" id="2_ykkar"]
|
[ext_resource type="PackedScene" uid="uid://btcksdsburk7t" path="res://sceen/total.tscn" id="2_ykkar"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6lortgihx5jy" path="res://Communication/voice_communication.tscn" id="4_v0grr"]
|
||||||
|
|
||||||
[node name="TrainingCloseDoorFault" type="Node"]
|
[node name="TrainingCloseDoorFault" type="Node"]
|
||||||
script = ExtResource("1_iggb0")
|
script = ExtResource("1_iggb0")
|
||||||
@ -15,4 +16,6 @@ sceneDesc = "上行门头灯亮关门故障"
|
|||||||
|
|
||||||
[node name="DepartTimer" type="Timer" parent="."]
|
[node name="DepartTimer" type="Timer" parent="."]
|
||||||
|
|
||||||
|
[node name="VoiceCommunication" parent="." instance=ExtResource("4_v0grr")]
|
||||||
|
|
||||||
[connection signal="StartTraining" from="TrainingDescDialog" to="." method="_on_training_desc_dialog_start_training"]
|
[connection signal="StartTraining" from="TrainingDescDialog" to="." method="_on_training_desc_dialog_start_training"]
|
||||||
|
Loading…
Reference in New Issue
Block a user