Your project manager is amazed with the shower of dozens of meteors in the background. However, he wants to add a more realistic background.
He shows you a water simulation sample using Farseer Physics Engine. He wants you to use the wave simulation capabilities offered by this powerful physics simulator to create an asteroids belt.
First, we are going to create a new class to define a fluid model capable of setting the initial parameters and updating a wave controller provided by the physics simulator.
Note
We will use Farseer Physics Engine's wave controller to add real-time fluids with movement for our games. The following code is based on the Silverlight water sample offered with the physics simulator. However, in this case, we are not interested in collision detection capabilities because we are going to create an asteroid belt in the background.
1. Stay in the
3DInvadersSilverlight
project.2. Create a new class—
FluidModel
.3. Replace the default...