No problem!
sign() means return -1 if the number is negative, 1 if the number is positive, and 0 if it's 0.
The line means:
Add to x:
10
times -1 if the number of recoils is negative, 1 if it's positive
times -1 if it's facing left, 1 if it's facing right.
So,
If number of times the recoil timer occurs is 6 (recoils = -3), the number of pixels it moves back is 10, and it's facing right, here's a timeline of the recoil:
- sign(-3) * 1 * 10 = -10
x += -10 - sign(-2) * 1 * 10 = -10
x += -10 - sign(-1) * 1 * 10 = -10
x += -10 - sign(0) * 1 * 10 = 0
x += 0 - sign(1) *1 * 10 = 10
x += 10 - sign(2) *1 * 10 = 10
x += 10 - sign(3) *1 * 10 = 10
x += 10
So we're back where we started.
That should hep you, but just ask if it doesn't.