UPDATE – Space Invaders
Quick presentational update to the Space Invaders project.
Keep Shields Centered On Hit
Shields will now automatically maintain a centered position when hit my an alien missile. I initially thought this was going to involve some math to determine whether the missile hit on the right or left side. I even put together a formula for calculating it that actually worked. Turns out it was a one-line solution. I just shift the x position of the shield right by one half of the damage to the shield.