Cool Transition Effects for Indicators

Thought I would throw out another cool tip for… well… Desktop/Android dev… either one, me guesses.

Instead of calling Indicator.setCurrentValue directly, you can use a GameTimer with Interpolation to update the value and it does some reaaaaalllllly cool stuff!

The general idea is to set up a GameTimer like so:

float tempScore, incScore, currentScore, finalScore;

// indScore is an Indicator… duh
scoreTimer = new GameTimer(timerTime) {
public void onComplete(float time) {
public void timerUpdateHook(float tpf) {
incScore = tempScore*getPercentComplete();

So, instead of calling the Indicator directly, you set up a method that will fire off the GameTimer after setting a couple a variables to use during the update:

public void incScoreIndicator(float tempScore, float currentScore) {
this.tempScore = tempScore;
this.currentScore = currentScore;
this.finalScore = this.currentScore+this.tempScore;



And the results look like this:



Hey, wow that is awesome.
I love it.
Good job.