so if (asteroids.get(i)) is an ArrayList of PVectors and this is written globally, I have written the hits() in the bullet class and checking the distance between the bullet.x and bullet.y to the asteroid.x and asteroid.y.
If I add void hits(PVector pos){ which would be the bullet pvector in the class, i then get hits() expecting paramenters hits(PVector) but its an array of PVectors
Based on the empty () in its fist line, it does not expect parameters. You can call it like this: hi();
…but not like this: hi("hello");
Here is another function:
void word(String wrd){
println(wrd);
}
It does expect parameters – the parameter wrd that appears in the () in the first line. You can call it like this: word("hello");
…but not like this: word();