Ejemplo n.º 1
0
Stage * Stage::createWithLevel(int level)
{
    Stage *ret = new Stage();
    if (ret->initWithLevel(level))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_DELETE(ret);
    return nullptr;
}
Ejemplo n.º 2
0
Stage* Stage::create(Gamescene* _m) {
	Stage *ret = new(std::nothrow) Stage();
	if (ret && ret->init(_m)) {
		ret->autorelease();
			return ret;
	}
	else {
		delete ret;
		ret = nullptr;
		return nullptr;
	}
}