This commit is contained in:
soul-walker 2024-04-12 16:56:06 +08:00
parent b94ebf3420
commit e7894a9af0
6 changed files with 49 additions and 2 deletions

1
UI/stand.gd Normal file
View File

@ -0,0 +1 @@
extends Node3D

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=6 format=3 uid="uid://d1lavjoj2lsgo"]
[gd_scene load_steps=7 format=3 uid="uid://d1lavjoj2lsgo"]
[ext_resource type="PackedScene" uid="uid://d167och8l6jms" path="res://UI/station_keys/station_keys_window.tscn" id="1_2e5v0"]
[ext_resource type="Script" path="res://UI/stand.gd" id="1_2m3ep"]
[ext_resource type="PackedScene" uid="uid://b7k8341jwy22f" path="res://UI/panel_container.tscn" id="1_jhtk0"]
[sub_resource type="BoxShape3D" id="BoxShape3D_qpl3n"]
@ -12,6 +13,7 @@ size = Vector3(60, 2, 60)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_tlxkr"]
[node name="Node3D" type="Node3D"]
script = ExtResource("1_2m3ep")
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)

19
default_bus_layout.tres Normal file
View File

@ -0,0 +1,19 @@
[gd_resource type="AudioBusLayout" load_steps=3 format=3 uid="uid://j3uthweaujv8"]
[sub_resource type="AudioEffectRecord" id="AudioEffectRecord_mgegs"]
resource_name = "Record"
[sub_resource type="AudioEffectCapture" id="AudioEffectCapture_6vgun"]
resource_name = "Capture"
[resource]
bus/1/name = &"Record"
bus/1/solo = false
bus/1/mute = true
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = &"Master"
bus/1/effect/0/effect = SubResource("AudioEffectRecord_mgegs")
bus/1/effect/0/enabled = true
bus/1/effect/1/effect = SubResource("AudioEffectCapture_6vgun")
bus/1/effect/1/enabled = true

View File

@ -8,7 +8,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="target/godot_station_keys.html"
export_path="target/web/index.html"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false

10
voice_conversation.gd Normal file
View File

@ -0,0 +1,10 @@
extends Node
var effect: AudioEffectRecord
# Called when the node enters the scene tree for the first time.
func _ready():
var idx = AudioServer.get_bus_index("Record")
effect = AudioServer.get_bus_effect(idx, 0)
effect.set_recording_active(true)

15
voice_conversation.tscn Normal file
View File

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://dcjnu0aoo5pda"]
[ext_resource type="Script" path="res://voice_conversation.gd" id="1_8yki8"]
[sub_resource type="AudioStreamMicrophone" id="AudioStreamMicrophone_rflwi"]
[node name="VoiceConversation" type="Node"]
script = ExtResource("1_8yki8")
[node name="AudioStreamRecord" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamMicrophone_rflwi")
autoplay = true
bus = &"Record"
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]