本文整理汇总了C++中CSprite::SetDivnum方法的典型用法代码示例。如果您正苦于以下问题:C++ CSprite::SetDivnum方法的具体用法?C++ CSprite::SetDivnum怎么用?C++ CSprite::SetDivnum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSprite
的用法示例。
在下文中一共展示了CSprite::SetDivnum方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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 );
}
}
}
示例2: Init
//.........这里部分代码省略.........
m_p2DObj->AppendObject( new CSprite("mission5.dds", Math::Vector2D( 426, 318 ) ), "MissionFont5", true );
m_p2DObj->AppendObject( new CSprite("pin.dds", Math::Vector2D( 383, 142 ) ), "Pin", true );
//m_p2DObj->AppendObject( new CSprite("pin2.dds", Math::Vector2D( 665, 490 ) ), "Pin2", true );
m_p2DObj->AppendObject( new CSprite("train.png", Math::Vector2D( 280, 150) ), "Picture1", true );
m_p2DObj->AppendObject( new CSprite("ameus.png", Math::Vector2D( 125, 240) ), "Picture2", true );
m_p2DObj->AppendObject( new CSprite("oashisu.png", Math::Vector2D( 480, 70) ), "Picture3", true );
m_p2DObj->AppendObject( new CSprite("funsui.png", Math::Vector2D( 75, 80 ) ), "Picture4", true );
m_p2DObj->AppendObject( new CSprite("manta.png", Math::Vector2D( 440, 260 ) ), "Picture5", true );
m_p2DObj->AppendObject( new CSprite("note.dds", Math::Vector2D( 322, 200 ) ), "Note", false );
#endif
m_p2DObj->AppendObject( new CSprite("ready.dds", Math::Vector2D( 159, 245 ) ), "Ready", true );
m_p2DObj->AppendObject( new CSprite("go.dds", Math::Vector2D( 300, 238 ) ), "Go", true );
m_p2DObj->AppendObject( new CSprite("nofilm.dds", Math::Vector2D( 300, 238 ) ), "NoFilm", false );
m_p3DObj->AppendObject( new CDebugLine(), "DebugLine", true );
//ifs.close();
#if defined( DEBUG_MAP_EDIT )
#elif defined( DEBUG_MAP_SEE )
#elif defined( DEBUG_CHAT )
#else
CSprite *pPin = dynamic_cast<CSprite *>( pScene->Get2DObject()->FindObjectFromName("Pin") );
pPin->SetDivnum( Math::Point2DI(2, 1) );
CSprite3D *pEmotion = dynamic_cast<CSprite3D *>( pScene->Get3DObject()->FindObjectFromName("Emotion") );
pEmotion->SetDivnum( Math::Point2DI( 4, 1 ) );
CSprite3D *pFlagBal = dynamic_cast<CSprite3D *>( pScene->Get3DObject()->FindObjectFromName("FlagBalloon") );
pFlagBal->SetDivnum( Math::Point2DI( 2, 1 ) );
#endif
//CSprite *pPin = dynamic_cast<CSprite *>( pScene->Get2DObject()->FindObjectFromName("Pin") );
//
//pPin->SetDivnum( Math::Point2DI(2, 1) );
//
//CSprite3D *pEmotion = dynamic_cast<CSprite3D *>( pScene->Get3DObject()->FindObjectFromName("Emotion") );
//
//pEmotion->SetDivnum( Math::Point2DI( 4, 1 ) );
//
//CSprite3D *pFlagBal = dynamic_cast<CSprite3D *>( pScene->Get3DObject()->FindObjectFromName("FlagBalloon") );
//
//pFlagBal->SetDivnum( Math::Point2DI( 2, 1 ) );
//---------------------------------------------------------------------------
//カメラ
//---------------------------------------------------------------------------
CCamera *objCamMain = dynamic_cast<CCamera *>( m_pGameObj->FindObjectFromName("CamMain") );
CCamera *objCamSub = dynamic_cast<CCamera *>( m_pGameObj->FindObjectFromName("CamSub") );