void HubLayer::attachToScene(cocos2d::Scene* scene) { if (scene) { detachFromScene(); scene->addChild(this, HUB_LAYER_LEVEL); } }
//--------------------------------------------------------------------------- // Func: CShip::~unload() //--------------------------------------------------------------------------- void CShip::unload() { FSOUND_StopSound( channel ); closeFile(); model.unload(); texture.unload(); model.releaseTexPointer(); detachFromScene(); // sets scene = NULL; trackPtr = NULL; initialized = 0; }