Skip to content

Commit be5d87d

Browse files
committed
VoiceManager doesn't hide texts, now waits to audio calc time.
1 parent ae34bf4 commit be5d87d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

blade-engine/src/com/bladecoder/engine/model/Text.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,14 @@ public Text(String str, float x, float y, float time, Type type, Color color, St
6262
if(this.time < 0 || voiceId != null) {
6363
this.time = Float.MAX_VALUE;
6464
} else if (this.time == 0) {
65-
this.time = DEFAULT_TIME + DEFAULT_TIME * str.length() / 20f;
65+
setAutoTime();
6666
}
6767
}
6868

69+
public void setAutoTime() {
70+
this.time = DEFAULT_TIME + DEFAULT_TIME * str.length() / 20f;
71+
}
72+
6973
public void callCb() {
7074
if (cb != null) {
7175
ActionCallbackQueue.add(cb);

blade-engine/src/com/bladecoder/engine/model/VoiceManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void retrieveAssets() {
131131
voice.setOnCompletionListener(new OnCompletionListener() {
132132
@Override
133133
public void onCompletion(Music music) {
134-
textManager.next();
134+
textManager.getCurrentText().setAutoTime();
135135
}
136136
});
137137

0 commit comments

Comments
 (0)