示例#1
0
StarMatrix* StarMatrix::create(GameLayer* layer){
	StarMatrix* ret = new StarMatrix();
	if(ret && ret->init(layer)){
		ret->autorelease();
		return ret;
	}
	CC_SAFE_DELETE(ret);
	return nullptr;
}
示例#2
0
StarMatrix* StarMatrix::create(int width, int height)
{
    StarMatrix* ret = new StarMatrix();
    if (ret && ret->init(width, height))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_DELETE(ret);
    return nullptr;
}