base
is used to call a method from one of the derived classes, ignoring methods from the current class (i.e., "non-virtual calls"). To reference the object itself whose code is being executed, use this
, as in java.
RocketPlayer pl = this;
In my opinion, the question "How do I reference the "father" within the method?" does not make much sense. There are no two objects in this context (parent and child), there is only one. This object is of the type UPlayer
, and that kind of drift RocketPlayer
.
It is important to distinguish between types (classes, interfaces, etc.) and objects (instantiations of these types). In this context, there are 2 types but only 1 object that can be referenced.