Now, we have to make some changes to the main game class to configure many behaviors according to the selected skill level.
1. Stay in the project,
3DInvadersSilverlight
.2. Click on
3DInvadersSilverlight
in the Solution Explorer.3. Select Project | Add Reference... and select System.Xml.Linq. Then, click on OK.
4. Open
InvadersGame.cs
.5. Add the following lines of code at the beginning. We are going to use LINQ (Language-Integrated Query) to XML:
using System.Linq; using System.Xml.Linq;
Note
C# 3.0 (Visual C# 2008) introduced LINQ. It is very useful for processing queries for many different data sources. The features of LINQ and its usage in real-life scenarios are described in-depth in LINQ Quickly (A Practical Guite to Programming Language Integrated Query with C#) by N. Satheesh Kumar, Packt Publishing.
6. Add the following
private
variables to hold the values for the parameters that define a specific...