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) {
|
speak(text: string) {
|
||||||
if (this.wordballoonState == null) {
|
if (this.wordballoonState != null) {
|
||||||
this.wordballoonState = new AgentWordBalloonState(this, text);
|
this.stopSpeaking();
|
||||||
this.wordballoonState.positionUpdated();
|
|
||||||
this.wordballoonState.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.wordballoonState = new AgentWordBalloonState(this, text);
|
||||||
|
this.wordballoonState.positionUpdated();
|
||||||
|
this.wordballoonState.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
stopSpeaking() {
|
stopSpeaking() {
|
||||||
|
|
Loading…
Reference in a new issue