Hello,
I have created a custom Sprite class and, obviously subclassed it from Sprite
. I am wondering if there is a way to create a vector of my custom sprite, like Vector<CustomSprite*> customSprites;
. Is there a way to do it? Currently, when I try it, it says that it is an invalid type because it does not derive from Object
; however, Sprite
does and I can definitely create a vector of type Sprite
.
The reason I need it is because I do not want the cast to be temporary. I have private members for that sprite that I need for the game. I can cast it temporarily, but anything I update will not stay.
How should I go about it? Should I just resort to the default std::Vector<T>
?