void CGamePlay::Exit() { CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance(); CSGD_ObjectManager *pOM = CSGD_ObjectManager::GetInstance(); CSGD_ObjectFactory<string, CBase> *pOF = CSGD_ObjectFactory<string, CBase>::GetInstance(); CSGD_WaveManager* pWM = CSGD_WaveManager::GetInstance(); CPlayerCharacter *pPC = CPlayerCharacter::GetInstance(); CSGD_EventSystem *m_pES = CSGD_EventSystem::GetInstance(); m_pES->UnregisterClient(this); CGame::GetInstance()->SetPaused(false); pOM->RemoveAllObjects(); pOF->ShutdownObjectFactory(); enemies.clear(); pTM->ReleaseTexture(m_nImageID[0]); pTM->ReleaseTexture(m_nImageID[1]); pTM->ReleaseTexture(m_nImageID[2]); pTM->ReleaseTexture(m_nImageID[3]); pTM->ReleaseTexture(m_nImageID[4]); pTM->ReleaseTexture(m_nBGID); pWM->UnloadWave(m_nBGMusicID); }
void COptions::Exit() { CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance(); CSGD_WaveManager *pWM = CSGD_WaveManager::GetInstance(); pTM->ReleaseTexture(m_nImageID[0]); pTM->ReleaseTexture(m_nImageID[1]); if (pWM->IsWavePlaying(m_nSoundID[0])) pWM->Stop(m_nSoundID[0]); if (pWM->IsWavePlaying(m_nSoundID[1])) pWM->Stop(m_nSoundID[1]); pWM->UnloadWave(m_nSoundID[0]); pWM->UnloadWave(m_nSoundID[1]); }