Task 1 – Basic game rendering
The focus of this task will be to add most drawing logic to the game in order to present the gameplay screen. We will also delve into gameplay logic where necessary and implement very basic versions of some of the game classes.
We will start by creating the gameplay screen class and making it visible. Add a new class to the “Screens” folder and name it GameplayScreen.
Add the following using statements to the beginning of the new class file:
Change the GameplayScreen class so that it will inherit from the GameScreen class:
class GameplayScreen : GameScreen
Add the following field definitions to the class. We will use these fields for loading the textures/fonts used to draw the screen (though some will not be used until much later in the exercise) and also to position some of the assets on the screen:
// Texture Members
// Rendering members
Override the LoadContent method in order to load the gamplay screen’s resources:
Page | 32