allow Agent.speak() to override a previous call to speak()
This commit is contained in:
parent
396ef67c78
commit
d089018082
1 changed files with 6 additions and 4 deletions
|
@ -265,11 +265,13 @@ export class Agent {
|
|||
}
|
||||
|
||||
speak(text: string) {
|
||||
if (this.wordballoonState == null) {
|
||||
this.wordballoonState = new AgentWordBalloonState(this, text);
|
||||
this.wordballoonState.positionUpdated();
|
||||
this.wordballoonState.show();
|
||||
if (this.wordballoonState != null) {
|
||||
this.stopSpeaking();
|
||||
}
|
||||
|
||||
this.wordballoonState = new AgentWordBalloonState(this, text);
|
||||
this.wordballoonState.positionUpdated();
|
||||
this.wordballoonState.show();
|
||||
}
|
||||
|
||||
stopSpeaking() {
|
||||
|
|
Loading…
Reference in a new issue