In the .cpp file:
- There is a #include of the header file of course.
- We have 3 functions: a constructor and 2 void ones. All belong to the class that we’ve created.
- In the constructor we set the boolean bCanEverTick which is a part of the PrimaryComponentTick struct to true.
- In BeginPlay() we have a namespace “Super” which contains a function called BeginPlay().
- The last function takes 3 arguments: a float (which is like a double but takes up less memory), an enum (for some reason not an enum class), and a pointer to FActorComponentTickFunction which is also a struct. This function also uses the “Super” namespace, through which we call the TickComponent function and pass all 3 arguments as arguments to it.
In the .h file:
- We have our classical #pragma once and some header files included which I don’t recognize.
- There are 3 macros: UCLASS, BUILDINGESCAPE_API, GENERATED_BODY().
- The class is publically inheriting from UActorComponent.
- It also contains all 3 access specifiers (public, protected and private).
- In protected and private there are virtual functions which are used in polymorphism, though I don’t know what override means (will have to Google it).
That’s pretty much it.