v0.6.1a: fixed crash issues relating to the game log

This commit is contained in:
Evan Debenham 2017-08-16 20:22:37 -04:00
parent 4c38519f6a
commit 720ec67a15

View File

@ -48,7 +48,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
recreateLines();
}
private void recreateLines() {
private synchronized void recreateLines() {
for (Entry entry : entries) {
lastEntry = PixelScene.renderMultiline( entry.text, 6 );
lastEntry.hardlight( lastColor = entry.color );
@ -56,12 +56,12 @@ public class GameLog extends Component implements Signal.Listener<String> {
}
}
public void newLine() {
public synchronized void newLine() {
lastEntry = null;
}
@Override
public void onSignal( String text ) {
public synchronized void onSignal( String text ) {
if (length != entries.size()){
clear();