To finish, we will insert items in our game. Items are objects we can pick up. These items will be weapons, lives or bullets. If we go to the ItemManager class, we can see there is a list which defines the kind of items, if it's a weapon, shotgun, rocketl, machinegun, life, or if they are weapons of the machinegun, rocket or shotgun. Then in lines 26 to 33 we have the structure, called TItem, which defines us the kind of item, its position, the item's Timer, the item's CurrentTime and if it's selected or not. Then there is the ItemManager class, which manages all our game's items as we can see in parsea, part of the class xmlparser, in which we will be able to parse the xml function, we have as important variables the items vector, in line 41, which will contain all the elements in our game, builder and debuilder. A method which selects an item from an index, another one which gives us back the item's information, another method, in line 51, which gives us the number of items there are in the scene, the method LoadASEObjects, which takes care of loading the items' geometry, and the render method, which will paint each of the items. As we said before, our game will read an xml file. This xml file will be the following: inside the Data folder, there is a folder called xml, and a file called Items. Those items will be defined inside this xml. In our case we can see we have a shotgun weapon, a rocketl weapon, another rocketl weapon and a shotgun. Its geometrical position and the timers. Then we have different items such as the life, which in this case is 10, and then three kinds of gun bullets, which are in lines 20, 21 and 22. So, in our ItemManager class we will have to parse this xml file, to do so what we will implement it, we will overwrite the OnStartElement, which will parse this file. In case we receive an ammoshotgun, we take off properties of the xml attributes and we create a TItem, a brief TItem in line 40, we initialize it with the values the xml gives us inside the items vector, in line 47. The same with ammorocket, analog, the same for ammomachinegun, shotgun, life, machinegun and rocketl, from where we will parse all the xml file. Then we have, as we said, the LoadASEObjects class, which gets the Device and loads each of the ASE objects with which we are going to paint those items. Depending on the type, we will add inside the map depending on this kind of item the ASE we need to paint this item. The GetInfoItem will give us back the information from the TItems net items, if and when the item is not selected. In case the item is selected, it will give back null, not free. The number of items method gives us back the number of items. SetItemSelected selects the item we give it as the index of the item of the items vector and initializes the current time to the item's timer. We do this so that when we pick an item it disappears from the screen for x seconds. So, during these seconds we won't be able to choose this item again. In line 263 we have the render method, in which we will use all our game's items and in case it isn't selected, this means we have to paint it. We will paint it from the transformation matrix of the ASEObject we have inside the ASEObjects map in m_Items. In case it is selected, we will decrease the item's current time by ElapsedTime, and in case it reaches 0 or less, the item won't be selected, so it will be painted again. To record it on the part of the code, we will go to the class ApplicationDX and we will implement a bit of the code to finish adding all the code we have explained. In ApplicationDX we will look at TO DO 2 to delete CASEObject's forward declaration. We will delete this, what we did before, because now we are going to put it inside the scenario. We delete the object we created in the first part. We also delete it, OK, that's all, let's see the cpp. We delete the PhysxManager object, the debugger of the x application class, we do Checked_Delete, m_PhysicsManager, we delete m_Player, Checked_Delete, m_Player and ItemManager, Checked_Delete, m_ItemManager. We have Scenary down here, which will be the game's scenario. Below we have created this to paint the room, in this case, we would delete the object's delete we have created to paint the room in the first part, so, we delete this line now. We delete the object we have created to paint the room in the TO DO part. Yes. We delete this line we have created before as well. We also delete the load we have previously created. We create the method, we create the m_PhysicsManager object, so, it equals to new CPhysicsManager, and we call Init. Now, inside the data initialization part, which is what we had in m_ItemManager. We call the method xmlParseFile, giving it the file's name. We call the LoadASEObjects method, passing it the Device so that the geometry and the items' assets load. We create the Player object. We call the player's LoadASEObjects method using Device. We create the m_Scenary object. We call the xmlParseFile so that it deletes the xml file. We load the ASE object, we use the Device on it. We establish the scenario's depth, SetDepth 2. That's all in the initialization part and in the Render part, we call the RenderScenary method using the DeviceContext and the camera position. We will get the camera's position from CameraManager. GetCamera, GetPosition. We will call the Player's Render method, using the DeviceContext and the ElapsedTime. We call the Render method from the ItemManager giving it the DeviceContext and the ElapsedTime again. We delete the code, this one. And in the Update method, we call the Player's Update method, using ElapsedTime and we call PhysicsManager, Update, we use ElapsedTime in seconds, so, we have to multiply ElapsedTime in seconds, we have to multiply it all by 0.01. Pass it to seconds. And here we have implemented all today's study part. Now we execute. We have our scenario, Where the character's counter collides with the scenario. We can pick up items, such as these life items, or such as a gun and we can shoot the gun, so these rays collide. And we have our scenario's physics. We can jump, etc. In this session we have learned the different typologies we can use to paint DirectX11 geometry. Painting static meshes inside our engine. A physics engine such as nVidia Physx with which we can integrate collisions to our motor or integrate items inside our video game's engine. Here you have many quotes and links which we have used in our slides, and I hope you liked it. Thank you!