本文整理汇总了C++中CSprite::Rendering方法的典型用法代码示例。如果您正苦于以下问题:C++ CSprite::Rendering方法的具体用法?C++ CSprite::Rendering怎么用?C++ CSprite::Rendering使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSprite
的用法示例。
在下文中一共展示了CSprite::Rendering方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Exec
//=============================================================================
//処理
//=============================================================================
//[input]
// pScene:設定するシーン
//=============================================================================
void CSceneMissionSelect::Exec( CScene *pScene )
{
static Sint32 Cursor = 0;
const int MISSION_MAX = 5;
Selene::Renderer::IRender *pRender = pScene->GetAppDevice()->GetRenderer();
CSprite *pBG = dynamic_cast<CSprite *>( pScene->Get2DObject()->FindObjectFromName("MissionSelect") );
CSprite *pPin = dynamic_cast<CSprite *>( pScene->Get2DObject()->FindObjectFromName("Pin") );
CFontSprite *pNumFont = dynamic_cast<CFontSprite *>( pScene->GetGameObject()->FindObjectFromName("NumFont") );
CFontSprite *pMiContFont = dynamic_cast<CFontSprite *>( pScene->GetGameObject()->FindObjectFromName("ContentFont") );
CFontSprite *pExpFont = dynamic_cast<CFontSprite *>( pScene->GetGameObject()->FindObjectFromName("ExplainFont") );
pNumFont->SetPosition( Math::Vector3D( 80, 520, 0 ) );
pMiContFont->SetPosition( Math::Vector3D( 340, 490, 0 ) );
//pExpFont->SetPosition( Math::Vector3D( 600, 10 )
Math::Point2DF vPos[] =
{
Math::Point2DF( 600, 10 ),
};
vector< string > vecText;
vecText.push_back( "R2 ミッション決定" );
pExpFont->SetVecTextChat( vecText );
/*画面のクリア*/
pRender->Clear();
/*描画開始*/
pRender->Begin();
pBG->Rendering();
CBGM *pTitleMusic = dynamic_cast<CBGM *>( pScene->GetSoundObj()->FindObjectFromName("TitleBGM") );
if( pScene->GetSceneState() == STATE_STANDBY )
{
if( !pTitleMusic->GetBGMDevice()->IsPlay() )
{
pTitleMusic->GetBGMDevice()->Play( );
}
}
if( pScene->GetSceneState() == STATE_FADEOUT )
{
pTitleMusic->GetBGMDevice()->Stop();
}
int MissionClrCount = 0;//ミッションのクリア数カウント
#if defined(DEBUG) | (_DEBUG)
MissionClrCount = 4;
#else
/*ミッションクリア数のカウントアップ*/
for( int i = 0; i < pScene->GetMissionMgr()->GetMissionNum(); ++i )
{
CMission *pMission = pScene->GetMissionMgr()->GetMission(i);
if( pMission->GetGameClearFlag() )
{
MissionClrCount++;
}
}
//MissionClrCount = 4;
if( MissionClrCount >= 4 )
{
MissionClrCount = 4;
}
#endif
for( int i = 0; i < MissionClrCount+1; ++i )
{
CMission *pMission = pScene->GetMissionMgr()->GetMission(i);
//.........这里部分代码省略.........
示例2: Exec
//=============================================================================
//処理
//=============================================================================
//[input]
// pScene:設定するシーン
//=============================================================================
void CScene::Exec(CScene *pScene)
{
Renderer::IRender *pRender = pScene->GetAppDevice()->GetRenderer();
CSprite *pSpr = dynamic_cast<CSprite *>( m_p2DObj->FindObjectFromName("Loading") );
pSpr->SetDivnum( Math::Point2DI(6, 1) );
pScene->GetAppDevice()->GetRenderer()->Clear();
pScene->GetAppDevice()->GetRenderer()->Begin();
pSpr->Rendering();
//pScene->GetAppDevice()->GetRenderer()->DebugPrint( Math::Point2DI( 400, 300 ), CColor(255, 255, 255 ), "Npw Loading" );
pScene->GetAppDevice()->GetRenderer()->End();
pSpr->DrawAnimation( 6, 0 );
/*ロード終わってない*/
if( !pScene->GetLoadEndFlag() )
{
static string Str = "Now Loading";
static int count = 0;
count ++;
if( count % 10 == 0 )
{
Str += ".";
}
if( count >= 40 )
{
count = 0;
Str = "Now Loading";
}
pRender->DrawText( Math::Point2DI( 590, 520 ), CColor(255, 255, 255 ), Str.c_str() );
}
/*ロード終了*/
if( pScene->GetLoadEndFlag() )
{
pSpr->SetVisibleFlag( false );
m_p3DObj->Init();
CCamera *objCamMain = dynamic_cast<CCamera *>( m_pGameObj->FindObjectFromName("CamMain") );
objCamMain->Init();
pSpr->Move();
/*キャラが画面外にいったら、次のシーンに*/
if( pSpr->GetPosition().x <= -100 )
{
#if defined( DEBUG_MAP_EDIT )
m_eNextScene = SCENE_GAMEMAIN;
#elif defined( DEBUG_MAP_SEE )
m_eNextScene = SCENE_DEMO;
#elif defined( DEBUG_CHAT )
m_eNextScene = SCENE_CHAT;
#endif
pScene->SetSceneState( STATE_STANDBY );
pScene->ChangeScene( m_eNextScene );
}
}
}