The Gladiator source (.cpp) file

Because source files always contain more than 20x more code than the header files, I would like to follow a different approach here in explaining the code. I will break down the source file into blocks, one by one.

The includes

As we mentioned earlier, any C++ file or even header file must start with the include statements. You don't have to include everything; some of the include statements will be there by default but others might be needed while you are building up the code.

Even if your game example is different and you wanted to have different functionalities, you might need to include more headers.

#include "Bellz.h" #include "Gladiator.h" #include "GameDataTables.h" #include "PaperSpriteComponent.h" #include ...

Get Mastering Unreal Engine 4.X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.