Here comes noob question.
Let's say I have class called TSprite. Now I make child class TAnimatedSprite that inherits from TSprite. Can I use objects of class TAnimatedSprite in functions that ask for TSprite object to be passed?
Here comes noob question.
Let's say I have class called TSprite. Now I make child class TAnimatedSprite that inherits from TSprite. Can I use objects of class TAnimatedSprite in functions that ask for TSprite object to be passed?
Generally yes. It's called polymorphism and is a key property of Object Oriented Programming and Design.
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
Bookmarks