Firstly, we are going to create many new methods in the
MainPage class for creating the sprites using the
SpriteWrapper subclasses, animate them, and control some of their actions. Then, we will be able to write a complex game loop:
MainPage.xaml.csand add the following lines to define
privatevariables in the
public partial class MainPage : UserControl:
// The aliens private List<AlienWrapper> _aliens; // The total number of tents private int _totalTents = 4; // The total number of rows and cols for the aliens private int _totalRows = 5; private int _totalCols = 11; // The four tents private List<TentWrapper> _tents; // The ship private ShipWrapper ...