Updates the get audiostream from phoneme function in Database
This commit is contained in:
@@ -90,7 +90,6 @@ func wrong() -> void:
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("left_click"):
|
||||
print("CLICK")
|
||||
pressed.emit()
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cn2rw06pltyiu" path="res://sources/utils/fx/right.tscn" id="2_edt4e"]
|
||||
[ext_resource type="PackedScene" uid="uid://cge0uyn30tcpv" path="res://sources/utils/fx/highlight.tscn" id="3_5uhvd"]
|
||||
[ext_resource type="Script" path="res://sources/utils/percent_margin_container.gd" id="3_vllju"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgio7muqck2bu" path="res://sources/utils/auto_size_label.tscn" id="4_26xiq"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6klih3h3ws6f" path="res://sources/utils/auto_size_label.tscn" id="4_26xiq"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://dquynn3nx52o" path="res://sources/minigames/jellyfish/red_jellyfish_animations.tres" id="5_gc31w"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlmbxcgiv8tpr" path="res://sources/utils/fx/wrong.tscn" id="6_w1tlu"]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
custom_minimum_size = Vector2(400, 400)
|
||||
offset_right = 400.0
|
||||
offset_bottom = 400.0
|
||||
scale = Vector2(1.02491, 1.02491)
|
||||
scale = Vector2(1.08314, 1.08314)
|
||||
script = ExtResource("1_06uwq")
|
||||
|
||||
[node name="BackFX" type="Control" parent="."]
|
||||
@@ -54,10 +54,9 @@ sprites = [NodePath("AnimatedSprite2D")]
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="SpriteControl"]
|
||||
unique_name_in_owner = true
|
||||
scale = Vector2(2.15054, 2.15054)
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
sprite_frames = ExtResource("5_gc31w")
|
||||
animation = &"idle"
|
||||
frame_progress = 0.472967
|
||||
centered = false
|
||||
|
||||
[node name="PercentMarginContainer" type="Container" parent="."]
|
||||
|
||||
@@ -41,7 +41,7 @@ var additional_word_list: Dictionary
|
||||
|
||||
|
||||
func _init_db() -> void:
|
||||
load_additional_word_list()
|
||||
# load_additional_word_list()
|
||||
# db_path = db_path
|
||||
#_import_words_csv()
|
||||
#_import_look_and_learn_data()
|
||||
@@ -257,9 +257,15 @@ func get_audio_stream_for_word(word: String) -> AudioStream:
|
||||
|
||||
|
||||
func get_audio_stream_for_phoneme(phoneme: String) -> AudioStream:
|
||||
var file_name: = _phoneme_to_string(phoneme)
|
||||
file_name += ".mp3"
|
||||
return load(words_path + file_name)
|
||||
var phoneme_array := phoneme.split("-")
|
||||
var path: = words_path + _phoneme_to_string(phoneme_array[0])
|
||||
for i in range(1, phoneme_array.size()):
|
||||
path += "-" + _phoneme_to_string(phoneme_array[i])
|
||||
path += ".mp3"
|
||||
|
||||
if FileAccess.file_exists(path) and ResourceLoader.exists(path):
|
||||
return load(path)
|
||||
return null
|
||||
|
||||
|
||||
func get_gp_look_and_learn_image(gp: Dictionary) -> Texture:
|
||||
|
||||
Reference in New Issue
Block a user