i just added in custom text to display the players remaining health, how many times the enemy can respawn, and the ufo's health (enemy), however since using this i have been experiencing slower gameplay. does anyone know why this could be?
the code that updates the images is what i believe is causing it. the method is being called in a subclass of this level
/**
* returns remaining enemy hp value
*/
public int getHpE(int amt)
{
int section1 = getObjects(Section1.class).size();
hpE = hpE- amt;
if (hpE != 0 || section1 == 0)
{
myText.updateImage(hpE);
removeObject(myText);
}
return hpE;
}
