Sorry about that. I am having problems about the code not doing as I wanted it to do.
And I have life defined in the enemy class...
and this is how I update it:
public void updateLife(int damagetaken) // returns the remaining life (damagetaken = gun's powerlevel)
{
life = life - damagetaken;
}
And thanks. I'll try the debugging and see what actually happens...
---
(EDIT)
I tried debugging it, and I've realised that the life has not been updated. Gosh. I'll see what I can do for now.
---
(EDIT AGAIN)
Thanks very much! It's all good now. Even just debugging helped a lot!
(So much for being a beginner