コード例 #1
0
void HubLayer::attachToScene(cocos2d::Scene* scene)
{
    if (scene)
    {
        detachFromScene();
        scene->addChild(this, HUB_LAYER_LEVEL);
    }
}
コード例 #2
0
ファイル: CShip.cpp プロジェクト: alexdangelo/spark2
//---------------------------------------------------------------------------
// Func: CShip::~unload()
//---------------------------------------------------------------------------
void CShip::unload()
{ 
  FSOUND_StopSound( channel );
  closeFile();
  model.unload();
  texture.unload();
  model.releaseTexPointer();
  detachFromScene(); // sets scene = NULL; trackPtr = NULL;
  initialized = 0;
}