Make TTS a singleton and load directly from the plugin.

This commit is contained in:
Nolan Darilek 2019-09-24 14:22:15 -05:00
parent fc1e658950
commit 251ee359d4
3 changed files with 2 additions and 10 deletions

View File

@ -19,7 +19,7 @@ run/main_scene="res://scenes/Main.tscn"
[autoload] [autoload]
Globals="*res://scripts/Globals.gd" TTS="*res://addons/godot-tts/TTS.gd"
[editor_plugins] [editor_plugins]

View File

@ -6,7 +6,7 @@ extends Node
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
Globals.tts.speak("Hello, world.", true) TTS.speak("Hello, world.")
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta): #func _process(delta):

View File

@ -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()