I recognize in the header file:
- The ActorComponent beeing included as PositionReporter is a class added to an actor.
- Inheritance in the class declaration; UPositionReporter inherits UActorComponent
- In the public scope is the Constructor of the class.
- The scope for the method BeginPlay() is protected which is accesible in the class that defines them and in classes that inherit from that class, also this is a virtual method that is overriding its own definition in its base class.
- TickComponent is a public method that takes three parameters and also is a virtual method that overrides its own definition in its base class.
Deeper into it in the cpp file:
- The constructor calls
PrimaryComponentTick.bCanEverTick = true;
which sets the class to update with every frame or in this case, give out the position of the chair each frame. - in the BeginPlay method of UPositionReporter there is a call to
Super::BeginPlay();
which means it is calling a method in the parent of the actual class, in this case BeginPlay which explains itself. - TickComponent method is a bit unclear to me as to what it actually does, to stick with the “recognition” which is the objective of this post i can say it takes three parameters and uses them to call a TickComponent method inside the parent of the class.
Adding up to this i recognized the ‘U’ letter beeing inserted at the start of the name of the class, which arise a couple of questions, can this be removed? is this mandatory?.
Im from Venezuela so if any of this was unclear perhaps i couldnt make myself understood.
If im wrong please let me know.