mirror of
https://github.com/lightsoutgames/godot-accessible-starter.git
synced 2024-11-24 06:55:57 +00:00
Make TTS
a singleton and load directly from the plugin.
This commit is contained in:
parent
fc1e658950
commit
251ee359d4
|
@ -19,7 +19,7 @@ run/main_scene="res://scenes/Main.tscn"
|
|||
|
||||
[autoload]
|
||||
|
||||
Globals="*res://scripts/Globals.gd"
|
||||
TTS="*res://addons/godot-tts/TTS.gd"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ extends Node
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
Globals.tts.speak("Hello, world.", true)
|
||||
TTS.speak("Hello, world.")
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
extends Node
|
||||
|
||||
const TTS = preload("res://addons/godot-tts/TTS.gd")
|
||||
var tts
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
tts = TTS.new()
|
Loading…
Reference in New Issue
Block a user