Hi
Seems strange, is there something fishy with your Class declaration?
This is something copied from a project of mine:
Worm[] wormArray = new Worm[maxWorms];
My worm class is just:
class Worm{
float xoff, yoff, roff;
float posX, posY;
float radMax = 0;
float radius = 0;
Worm(float _x, float _y, float _rad){
radMax = _rad;
xoff = _x;
yoff = _y;
roff = 0;
}
I sometimes go with the ArrayList instead:
Quote:
class PlasmaSys{
ArrayList plasma;
float radMax = 50;
int numOfPlasma;
PlasmaSys(int plasmaCount, float _offX, float _offY ){
numOfPlasma = plasmaCount;
plasma = new ArrayList();
for( int i = 1; i <= plasmaCount; i++ ){
plasma.add(new Plasma( width/2, height/2, 150, i, _offX, _offY));
}
}
void run(){
for( int i = plasma.size()-1; i >= 0; i-- ) {
Plasma p = (Plasma) plasma.get(i);
p.run();
}
}
}
I can't spot the problem, but try to check your real code or post it (Processing -> Tools -> Copy for Discourse)
Ricki