mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 19:15:56 +00:00
Clean up TTS
initialization.
This commit is contained in:
parent
934a40e273
commit
e2f81c32dc
10
TTS.gd
10
TTS.gd
|
@ -6,15 +6,13 @@ var TTS
|
||||||
var tts = null
|
var tts = null
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
if not TTS:
|
if OS.has_feature("JavaScript"):
|
||||||
return
|
return
|
||||||
if not OS.has_feature('JavaScript') and not Engine.has_singleton("AndroidTTS"):
|
|
||||||
TTS = preload("godot-tts.gdns")
|
|
||||||
if OS.has_feature('JavaScript'):
|
|
||||||
pass
|
|
||||||
elif Engine.has_singleton("AndroidTTS"):
|
elif Engine.has_singleton("AndroidTTS"):
|
||||||
tts = Engine.get_singleton("AndroidTTS")
|
tts = Engine.get_singleton("AndroidTTS")
|
||||||
elif TTS.can_instance() or Engine.editor_hint:
|
else:
|
||||||
|
TTS = preload("godot-tts.gdns")
|
||||||
|
if TTS and (TTS.can_instance() or Engine.editor_hint):
|
||||||
tts = TTS.new()
|
tts = TTS.new()
|
||||||
else:
|
else:
|
||||||
print_debug("TTS not available!")
|
print_debug("TTS not available!")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user