foreach(PlayerBase p in Members)
{
    p.Render();
}
The Members list contains members of type FieldPlayer or GoalKeeper. FieldPlayer and GoalKeeper inherit from PlayerBase. When I call p.Render(), I need the appropriate Render call to be called for FieldPlayer or GoalKeeper. How do I do that?
Thanks
You make the PlayerBase.Render method virtual. See this question for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With