I have a sound play when my Actor gets hurt but it plays a little bit after the event takes place. Is this my code or is my computer just slow. will it upload with the delay?
public void hurt()
{
Actor spike = getOneObjectAtOffset(0, getImage().getHeight()/2, spike.class);
if(spike == null)
{
}
else
{
setLocation(40 , 408);
helpCounter += 1;
Greenfoot.playSound("Electricity2.wav");
}
}

