Hi everyone
I'm still at my program for school and need a little help again.
here you see my Code and my question is how can I get the amount of beams that is actually in my world as an int ?
int beamamount = 0;
public void powermove(){
if(health>0){
beamamount = getWorld().getObjects(beam); //get the beam amount here but how ?
if(beamamount >=1 ){
if (powermover <= 0){
if (Greenfoot.isKeyDown("a")){
move (-250);
powermover = powermover +100;
}
if(Greenfoot.isKeyDown("d")){
move (250);
powermover = powermover +200;
}
}
else{
powermover = powermover - 1;
}
}
}
}
