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—applying transition effects

Now we are going to add a blood effect transition before the game starts. This is our first attempt to add transition effects using Windows Presentation Foundation Pixel Shader Effects Library.

  1. Open the project 3DInvadersSilverlight in Visual Studio or Visual C#.
  2. Expand MainPage.xaml in the Solution Explorer and open MainPage.xaml.cs.
  3. Add the following lines of code at the beginning of the class definition:
    using TransitionEffects;
    using System.Windows.Media.Imaging;
    
  4. Add the following private method, StartGame:
    private void StartGame()
    {
    }
    
  5. Copy the code inside the Click event of the Button btnStartGame and paste it into the previously mentioned method. Then, comment the first line that collapses the button's ...

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