return menuBarAnimation;
}
public static Animation getEmergencyStatusAnimation( EmergencyType type, int total, int remaining) {
Animation emergencyStatusAnimation = new Animation();
emergencyStatusAnimation.setLooping(true);
emergencyStatusAnimation.setAutoUpdate(true);
if (type == EmergencyType.FIRE) {
String percentage = calculatePercentage(total, remaining);
emergencyStatusAnimation.addFrame(getFireEmergencyStatusSpriteSheet(percentage).getSprite(0, 0), 1000);
}
if (type == EmergencyType.HEART_ATTACK) {
String percentage = calculatePercentage(total, remaining);
emergencyStatusAnimation.addFrame(getHeartAttackEmergencyStatusSpriteSheet(percentage).getSprite(0, 0), 1000);
}
return emergencyStatusAnimation;
}