Can someone please tell me what I am doing wrong as this is not working, this is my code
Rocket2 Rocket=new Rocket2();
public void act(){
if(Greenfoot.isKeyDown("enter"))
{
getWorld().addObject(Rocket,200,300);
}
}

