October 2016
Beginner
520 pages
10h 19m
English
We have done the tricky stuff, this will be simple. There are three steps:
VertexArray.Add the code highlighted in the following to declare a VertexArray called background and load the background_sheet.png as a texture:
// Create an instance of the Player class
Player player;
// The boundaries of the arena
IntRect arena;
// Create the backgroundVertexArray background;
// Load the texture for our background vertex array
Texture textureBackground;
textureBackground.loadFromFile("graphics/background_sheet.png");
// The main game loop
while (window.isOpen())
Add the following code to call the createBackground function, passing in background as a reference and ...
Read now
Unlock full access