Ok, this is my code (well, not yet but if it works then yes it is ):
If I then call collide(), and there is a collision, will Shields::upgrade() be called or will Upgrade::upgrade() be called?Code:class Upgrade { public: bool collide(); protected: virtual void upgrade(); }; class Shields : public Upgrade { protected: void upgrade(); }; void Upgrade::upgrade() {} bool Upgrade::collide() { if(/*collision*/) { //disappear (I'll figure it out later) upgrade(); // <--- return true; } return false; } void Shields::upgrade() { stuff(); }