怎样把CCSprite的子类加入到CCSpriteBatchNode中

我创建了一个CCSprite的子类, (即该类继承至CCSprite)

class Bullet : public CCSprite
{
public:
     static Bullet* bullet();
 ...
Bullet* Bullet::bullet()
{
     this->create("bullet.png");
  
     return this;
}

但我用CCSpriteBatchNode addChild 的时候 , 它就发生错误.

CCSpriteBatchNode* batch = CCSpriteBatchNode::create("bullet.png");
Bullet *bu = Bullet::bullet();
batch->addChild(bu);

可能是需要同样的texture.
但我不知道怎么样初始化Bullet, 可以得到同样的texture.

这个人可能越来越少了

800多个浏览的, 都没一个回复,
算了, 我自己来.

最后的解决方案是在sample的TestCpp 里面找到.

Bullet* Bullet::create(const char *pszName)
{
	Bullet *pobSprite = new Bullet();
	pobSprite->initWithFile(pszName);
	pobSprite->autorelease();

        pobSprite->initSprite();

	return pobSprite;
}

bool Bullet::initSprite()
{
	if(TRUE)
	{
		//other initialize
	}

	return true;
}

这个人可能越来越少了

我也想知道这个问题 如何解决的…