hi all, actually i’m a java&objc programmer, my c*+ experience was so limited…
i wanna extend CCSprite, just like objc or java, i did it like this:
——
class BorderedSprite : public CCSprite {
virtual void draw;
};
void BorderedSprite::draw{
CCSprite::draw;
//other code…
}
——
and i get an instance like this:
BorderedSprite *sprite = BorderedSprite::spriteWithSpriteFrameName;
but sprite still a CCSprite, not a BorderedSprite… that is to say, BorderedSprite::draw never be called…
sorry for my poor c*+ knowledge, could anyone help me? thanks for any suggestion.