本文整理汇总了C++中CElement::Action方法的典型用法代码示例。如果您正苦于以下问题:C++ CElement::Action方法的具体用法?C++ CElement::Action怎么用?C++ CElement::Action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CElement
的用法示例。
在下文中一共展示了CElement::Action方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GameMain
void CGame::GameMain()
{
int i;
CShanaProt* player1;
CShanaProt* player2;
m_Mode = m_NextMode ;
switch( m_Mode ){
case 0:
// タイトルのスタート
m_ModeTitle = new(m_CommonMode) CModeTitle( this );
SetMode( 2 );
break;
case 1:
// バトルモードスタート
new(m_CommonMode) CModeBattle( this, m_ModeCharaSel->GetDecideChara( 0 ), m_ModeCharaSel->GetDecideChara( 1 ));
SetMode( 2 );
break;
case 3:
// タイトルモードの削除
if( m_ModeTitle != NULL ){
delete m_ModeTitle;
m_ModeTitle = NULL;
}
if( m_ModeCharaSel != NULL ){
delete m_ModeCharaSel;
m_ModeCharaSel = NULL;
}
SetMode( 2 );
break;
case 4:
//
new(m_CommonMode) CModeBattle( this );
SetMode( 2 );
break;
case 5:
// キャラセレクトのスタート
m_ModeCharaSel = new(m_CommonMode) CModeCharaSelect( this );
if( m_ModeTitle != NULL ){
delete m_ModeTitle;
m_ModeTitle = NULL;
}
SetMode( 2 );
break;
}
m_Input->UpDateState();
CElement* cEle;
CElement* cEleNext;
// MOVE Main
cEle = m_CommonMode->m_ActiveTask->m_Next;
while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
cEleNext = cEle->m_Next ;
if( cEle->Move() == FALSE ){
delete cEle;
}
else{
cEle->Action();
cEle->ActionFinalize();
cEle->Interfere();
cEle->InterfereFinalize();
}
cEle = cEleNext ;
}
// Begin the scene.
LPDIRECT3DDEVICE9 d3ddevice;
d3ddevice = m_D3DDraw.GetDevice();
d3ddevice->BeginScene();
// 画面クリア
d3ddevice->Clear(0,NULL,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0);
/* for( i=0 ; i<4 ; i++ ){
if( m_DispObjGroup->m_CDisp[i].m_Visible == TRUE ){
m_D3DDraw.Draw( &m_DispObjGroup->m_CDisp[i] );
}
}
*/
cEle = m_CommonMode->m_ActiveTask->m_Next;
while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
cEleNext = cEle->m_Next ;
cEle->Draw( &m_D3DDraw );
cEle->DrawFinalize();
cEle = cEleNext ;
}
d3ddevice->EndScene();
// CFps::GetCFps()->WaitNextUpdate();
// 画面に表示(バッファスワップ)
//.........这里部分代码省略.........