Less code - Similar results

As you can see in the code below, I realized that in the ProcessThrust() method in the if/else statements, you can simply call the mainBoosterParticles.Play(); and Stop(); in their respective locations. I understand you can compartmentalize this as it is separate issues, but I thought putting them together made sense as the sound and the particles will always play and stop at the same time either way in this particular case. Let me know your thoughts - always open for suggestions on tweaking my code. Thanks!

EDIT Left and Right thruster particles have been swapped since this was posted for more natural feel. Left thruster turns on when moving right, Right thruster on when turning left.

Privacy & Terms