is there something wrong with my code that is making green foot glitch?
public class Projectile extends Actor
{
int x;
public Projectile()
{
setRotation(270);
}
public void act()
{
hit();
ProjectileInterval();
move(5);
}
public void ProjectileInterval()
{
x = ((x+1)%25);
if (x == 0)
{
shoot();
}
}
public void shoot()
{
getWorld().addObject(new Projectile(), 400, 475);
}
public void hit()
{
if (isTouching(Space_Invader.class))
{
removeTouching(Projectile.class);
}
}
}
