This commit is contained in:
parent
ea030fb8c3
commit
ed0f08902a
4 changed files with 15 additions and 6 deletions
|
@ -133,13 +133,16 @@ void CBossText::shutdown()
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CBossText::select()
|
||||
void CBossText::select(int _dontChangeMusic)
|
||||
{
|
||||
m_readyToExit=false;
|
||||
m_currentPage=0;
|
||||
|
||||
CSoundMediator::stopSong();
|
||||
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
||||
if(!_dontChangeMusic)
|
||||
{
|
||||
CSoundMediator::stopSong();
|
||||
CSoundMediator::setSong(s_bossData[GameScene.GetLevel().getCurrentChapter()-1].m_songId);
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
void init();
|
||||
void shutdown();
|
||||
|
||||
void select();
|
||||
void select(int _dontChangeMusic=false);
|
||||
void think(int _frames);
|
||||
void render();
|
||||
int isReadyToExit();
|
||||
|
|
|
@ -226,6 +226,7 @@ void CGameScene::init()
|
|||
m_showingLivesTimer=0;
|
||||
|
||||
s_showBossTextOnRespawn=false;
|
||||
m_playingBossMusic=false;
|
||||
}
|
||||
/*****************************************************************************/
|
||||
// This is a seperate funtion ( and virtual ) so that we can overload it for
|
||||
|
@ -419,7 +420,11 @@ void CGameScene::think(int _frames)
|
|||
if(m_bossText->isReadyToExit())
|
||||
{
|
||||
m_gamestate=GAMESTATE_PLAYING;
|
||||
CSoundMediator::playSong();
|
||||
if(!m_playingBossMusic)
|
||||
{
|
||||
CSoundMediator::playSong();
|
||||
m_playingBossMusic=true;
|
||||
}
|
||||
sendEvent( BOSS_FOUND_EVENT, NULL );
|
||||
CFader::setFadingIn();
|
||||
}
|
||||
|
@ -739,7 +744,7 @@ void CGameScene::respawnLevel()
|
|||
else
|
||||
{
|
||||
m_gamestate=GAMESTATE_SHOWING_LIVES_BUT_GOING_TO_BOSS_TEXT;
|
||||
m_bossText->select();
|
||||
m_bossText->select(m_playingBossMusic);
|
||||
}
|
||||
m_showingLivesTimer=0;
|
||||
CSoundMediator::setCanPlaySfx(true);
|
||||
|
|
|
@ -139,6 +139,7 @@ static CLayerCollision *s_GlobalCollision;
|
|||
static int s_bossHasBeenKilled;
|
||||
static DVECTOR s_CamShake;
|
||||
static int s_showBossTextOnRespawn;
|
||||
int m_playingBossMusic;
|
||||
|
||||
|
||||
int m_levelHasTimer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue