public void update(float tpf) { if (!isEnabled()) return; statistics.getData(statData); stringBuilder.setLength(0); // Need to walk through it backwards, as the first label // should appear at the bottom, not the top. for (int i = statLabels.length - 1; i >= 0; i--) { stringBuilder.append(statLabels[i]).append(" = ").append(statData[i]).append('\n'); } statText.setText(stringBuilder); // Moved to ResetStatsState to make sure it is // done even if there is no StatsView or the StatsView // is disable. //statistics.clearFrame(); }
public void update(float tpf) { statistics.getData(statData); for (int i = 0; i < labels.length; i++) { stringBuilder.setLength(0); stringBuilder.append(statLabels[i]).append(" = ").append(statData[i]); labels[i].setText(stringBuilder); } statistics.clearFrame(); }
public void update(float tpf) { if (!isEnabled()) return; statistics.getData(statData); stringBuilder.setLength(0); // Need to walk through it backwards, as the first label // should appear at the bottom, not the top. for (int i = statLabels.length - 1; i >= 0; i--) { stringBuilder.append(statLabels[i]).append(" = ").append(statData[i]).append('\n'); } statText.setText(stringBuilder); // Moved to ResetStatsState to make sure it is // done even if there is no StatsView or the StatsView // is disable. //statistics.clearFrame(); }