I have a multiplayer game with two actors who shoot lasers. Both actors have pretty much identical code, yet one of them doesn't shoot.
Here's the what I have for the one that works:
in act...
if ("down".equals(Greenfoot.getKey())) {
shoot();
}
and then at the end...
public void shoot()
{
getWorld().addObject(new Laser(), getX() , getY());
}
And here's the code for the one that doesn't work:
In act...
if ("s".equals(Greenfoot.getKey()))
{
shoot();
}
later on...
public void shoot()
{
getWorld().addObject(new JayLaser(), getX() , getY());
}
