So I have this bit working
and works just fine but after that i'm doing another method
I am using this method in a superclass and referencing it in a world subclass
It might be because I am referencing the method in a bat bay but i'm not sure how to fix it
public void maimult( int nr )
{
/**
*Mai mult - creaza un submeniu
*/
World lume = getWorld();
options_rez[] rezol = new options_rez[nr];
if( !exista )
{
int i;
int x = this.getX();
int y = this.getY();
for (i=0 ; i < nr ; i++)
{
rezol[i] = new options_rez();
lume.addObject( rezol[i] , x + 100 , y + 50 * i );
}
exista = true ;
}
else
{
int i;
for (i=0 ; i < nr ; i++)
{
lume.removeObject ( rezol[i] );
}
}public void buildunda( int nr , double lamda , double A , double frecventa , double unghi , boolean vert , int x, int y )
{
World lume = getWorld();
Unda[] punctepeunda = new Unda[nr];
int i;
for( i=0 ; i<nr ; i++ )
{
punctepeunda[i] = new Unda();
punctepeunda[i].A = A;
punctepeunda[i].frecventa = frecventa;
punctepeunda[i].unghi = unghi - 3 * i/lamda;
lume.addObject( punctepeunda[i] , x + 3 * i , y );
}
}public class simulareUnde extends World
{
/**
* Constructor for objects of class simulareUnde.
*/
public simulareUnde()
{
super(global.rez[0], global.rez[1], 1);
preg();
}
private void preg()
{
Oscilator undamea = new Oscilator();
undamea.buildunda( 10 , 200 , 200 , 0.01 , 0 , true , 100 , 300 );
}
}

