void StateMenu::RenderPlay()	{
    switch( m_SubState_Play ) {
    case PlayState::INITPLAYER : {
        return;
    }
    break;
    case PlayState::WAITPLAYER: {
        RenderTiles();
    }
    break;
    case PlayState::EXECUTE: {
        RenderTiles();
    }
    break;
    case PlayState::GAMEOVER: {
    }
    break;
    }
    // draw player next number
    Player* playernow;
    if( m_PlayerTurn == PlayerType::B ) {
        playernow = &m_Player_B; // blue
        unsigned int nnumb = playernow->Numbers[ playernow->NumberIndex+1 ];
        char temp[8];
        itoa( nnumb , temp, 10);
        wchar_t* tempwch = UTF8ToWChar( temp );
        if( nnumb < 10 )
            m_SprFont->DrawString( m_XDSystem->Renderer->SpriteBatchs[ XDGameRenderer::EBATCH::L1 ] , tempwch, XMFLOAT2( 731, 384 ), Colors::OrangeRed, 0 );
        else
            m_SprFont->DrawString( m_XDSystem->Renderer->SpriteBatchs[ XDGameRenderer::EBATCH::L1 ] , tempwch, XMFLOAT2( 724, 384 ), Colors::OrangeRed, 0 );
        delete[] tempwch;
    } else {
        playernow = &m_Player_A;
        unsigned int nnumb = playernow->Numbers[ playernow->NumberIndex+1 ];
        char temp[8];
        itoa( nnumb , temp, 10);
        wchar_t* tempwch = UTF8ToWChar( temp );
        if( nnumb < 10 )
            m_SprFont->DrawString( m_XDSystem->Renderer->SpriteBatchs[ XDGameRenderer::EBATCH::L1 ] , tempwch, XMFLOAT2( 731, 54 ), Colors::OrangeRed, 0 );
        else
            m_SprFont->DrawString( m_XDSystem->Renderer->SpriteBatchs[ XDGameRenderer::EBATCH::L1 ] , tempwch, XMFLOAT2( 724, 54 ), Colors::OrangeRed, 0 );
        delete[] tempwch;
    }
}
Example #2
0
void Renderer::RenderGameObjects()
{
	RenderBalls();
	RenderTiles();
	RenderPaddles();
	RenderBullets();
	RenderBonusBoxes();

	RenderParticles();
}