本文整理汇总了C++中Tetris::getScoreInt方法的典型用法代码示例。如果您正苦于以下问题:C++ Tetris::getScoreInt方法的具体用法?C++ Tetris::getScoreInt怎么用?C++ Tetris::getScoreInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tetris
的用法示例。
在下文中一共展示了Tetris::getScoreInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GameOnSelect
void GameOnSelect( VariantList* pVList )
{
Entity *pEntClicked = pVList->m_variant[1].GetEntity();
Tetris* tetris = Tetris::GetInstance();
Config* config = Config::GetInstance();
if( pEntClicked->GetName() == GUI_IMAGEBUTTON_GAMEPLAY_MENU_BUTTON )
{
GetApp()->buttonClickSound();
if( tetris->isEndGame() )
{
SlideScreen( pEntClicked->GetParent(), false );
GetMessageManager()->CallEntityFunction( pEntClicked->GetParent(), 500, "OnDelete", NULL );
GetApp()->setGame( false );
GetApp()->setContinueBtn( false );
if( tetris->getScoreInt() > config->getMinScore() )
{
GameState::SetState( new GS_Menu() );
InputBestScoreCreate( pEntClicked->GetParent()->GetParent() );
}
else
{
tetris->ResetEndGame();
GameState::SetState( new GS_Menu() );
MainMenuCreate( pEntClicked->GetParent()->GetParent() );
}
tetris->FreeInstance();
config->FreeInstance();
return;
}
GameState::SetState( new GS_Menu() );
if( config->getMusic() )
{
GetAudioManager()->StopMusic();
}
GetApp()->setGame( false );
SlideScreen( pEntClicked->GetParent(), false );
GetMessageManager()->CallEntityFunction( pEntClicked->GetParent(), 500, "OnDelete", NULL );
MainMenuCreate( pEntClicked->GetParent()->GetParent() );
}
if( pEntClicked->GetName() == GUI_IMAGEBUTTON_GAMEPLAY_DOWN && !tetris->isEndGame() )
{
if( config->getSoundEffects() )
{
GetAudioManager()->Play( GetApp()->getResourceInstance()->getItem(GetApp()->getResolutionType(), RES_TYPE_AUDIO, RES_ID_AUDIO_FIGURE_DOWN ) );
}
tetris->ClickForceDown();
}
if( pEntClicked->GetName() == GUI_IMAGEBUTTON_GAMEPLAY_LEFT && !tetris->isEndGame() )
{
buttonMoveSound();
tetris->ClickLeft();
}
if( pEntClicked->GetName() == GUI_IMAGEBUTTON_GAMEPLAY_RIGHT && !tetris->isEndGame() )
{
buttonMoveSound();
tetris->ClickRight();
}
if( pEntClicked->GetName() == GUI_IMAGEBUTTON_GAMEPLAY_ROTATE && !tetris->isEndGame() )
{
buttonMoveSound();
tetris->ClickRotate();
}
tetris->FreeInstance();
config->FreeInstance();
}