Hello all,
Here is my code:
TEqualCollider = class(TInterfacedObject, ICollider)
const
ColliderCount = 4;
private
ColliderTop, ColliderRight, ColliderBottom, ColliderLeft: TCollider;
public
procedure InstantiateAll(AUPosition, AUSize: TPointF; AThickness: single); virtual;
procedure RegisterAll
procedure UnregisterAll;
function Count: Cardinal;
function Get(index: Cardinal): TCollider;
procedure DrawDebug(ctx: TBGLContext);
end;
TPlatformCollider = class(TEqualCollider)
public
procedure InstantiateAll(AUPosition, AUSize: TPointF; AThickness: single); override;
end;
I am using interfaces to define many different versions of the object collider. I would like to inherit all implementations from the TEqualCollider into TPlatformCollider, while overriding one procedure. Difference between the two is very small, I don't want to copy paste entire class.
Ive also tried this:
TPlatformCollider = class(TEqualCollider, ICollider)
The code compiles OK either way, but it does not seem to work. Is this possible to do? Maybe I should move onto multiple inheritance?