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.
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 ...