How do I spawn an actor that has a reference to another actor the code I have for it is
in the other actor it is set to
does anyone know why its not working
if(Greenfoot.isKeyDown("space"))
{if(timeLeft>= 50 && target>=1){
Object object;
object = getClass();
Bullet bullet = (Bullet)object;
Counter counter = bullet.getShip1();
getWorld().addObject(bullet, getX(), getY());
target--;
timeLeft=0;}}Counter counter=null;
public Bullet(Counter counter)
{}
public Counter getShip1()
{return counter}
