All I am trying to do is add a half or full second delay to a line of code all i want is to play one animation and let it finish the switch to another.
if (keyWentDown("space")) {
player.setAnimation("attack");
player.x = player.x+0.001;
}
drawSprites();
}