StarMatrix* StarMatrix::create(GameLayer* layer){ StarMatrix* ret = new StarMatrix(); if(ret && ret->init(layer)){ ret->autorelease(); return ret; } CC_SAFE_DELETE(ret); return nullptr; }
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; }