// we are playing tricks here: to avoid modifying the TopDownActor
// class we
// retrieve the players from the world and rotate them too
for (String name : rotatingPlayers) {
Entity player = world.find(name);
if (player != null)
player.setAngle(this.getAngle());
}
} else if ("scaleMe".equals(alarmName)) {
this.scale += scaleDir;
if (this.scale <= 0.1f || this.scale >= 2.0f)
scaleDir *= -1;
for (String name : scalingPlayers) {
Entity player = world.find(name);
if (player != null)
player.scale = this.scale;
}
} else if ("alphaMe".equals(alarmName)) {
float alpha = this.getAlpha();
this.setAlpha(alpha + alphaDir);
alpha = this.getAlpha();
if (alpha <= 0.1f || alpha >= 1.0f)
alphaDir = -alphaDir;
for (String name : alphaPlayers) {
Entity player = world.find(name);
if (player != null)
player.setAlpha(this.getAlpha());
}
}
}