image_angle = direction if (x >= 160) hspeed -= 0.8 else hspeed += 0.8