O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—creating a mouse manager class

Now, your project manager wants to use the left mini stick to move the ship. As it controls the mouse pointer, you can take into account its position to allow a player to use the left mini stick in a Silverlight application.

It is time to create a simple yet useful mouse manager class. It must be able to track the left button and the mouse pointer's position between each rendered frame:

Tip

As Silverlight runs on both Windows and Mac OS X, it allows us to know the state for the left mouse button. Mac computers do not have a right mouse button. Besides, Silverlight applications can run on Linux through the Moonlight project: http://www.mono-project.com/Moonlight

  1. Stay in the SilverlightInvaders2DVector ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required