本文整理汇总了C++中CMover类的典型用法代码示例。如果您正苦于以下问题:C++ CMover类的具体用法?C++ CMover怎么用?C++ CMover使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CMover类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunScript
void CWndDialog::RunScript( const char* szKey, DWORD dwParam, DWORD dwQuest )
{
CMover* pMover = prj.GetMover( m_idMover );
if( pMover )
g_DPlay.SendScriptDialogReq( pMover->GetId(), szKey, dwParam, dwQuest, pMover->GetId(), g_pPlayer->GetId() );
m_timer.Set( SEC( 1 ) );
}
示例2: Draw
// 그리기
void CPuzzleGame::Draw()
{
LPDIRECT3DDEVICE9 device = Graphics->GetDevice();
Graphics->Clear(COL_WHITE);
CStage* stage = Stage[StageIndex];
stage->Draw();
for (int order = 0, count = 0; count < MoverList->GetNumActiveTask(); order++)
{
for (CTaskIter i(MoverList); i.HasNext();)
{
CMover* mover = (CMover*)i.Next();
if (order == mover->DrawOrder)
{
mover->Draw();
count++;
}
}
}
Font->DrawText(wstring(L"\"") + stage->Name + L"\"", 0, 0, D3DCOLOR_RGBA(255, 116, 82, 255));
if (!StageActive)
{
Font->DrawText(L"PUSH BUTTON4 OR [B] TO START", 0, 32, D3DCOLOR_RGBA(255, 116, 82, 255));
}
}
示例3: DoDuelPartyCancel
//
// 극단 듀얼 해제
//
void CParty::DoDuelPartyCancel( CParty* pDuelParty )
{
#ifndef __CORESERVER
int i;
CMover *pMember;
for( i = 0; i < m_nSizeofMember; i ++ ) // 극단원 모두에게 듀얼 해제를 세팅하고 클라에도 알림.
{
#ifdef __WORLDSERVER
pMember = (CMover *)g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
#else
#ifdef __CLIENT
pMember = prj.GetUserByID( m_aMember[i].m_uPlayerId );
#endif
#endif // worldserver
if( IsValidObj( pMember ) )
{
#ifdef __WORLDSERVER
if( pDuelParty )
((CUser *)pMember)->AddDuelPartyCancel( pDuelParty ); // 각 멤버들에게 듀얼이 취소되었다고 알림.
else
((CUser *)pMember)->AddDuelPartyCancel( NULL ); // 각 멤버들에게 듀얼이 취소되었다고 알림.
if( pMember->m_idDuelParty != m_idDuelParty )
Error( "CParty::DoDuelPartyCancel : 파티멤버 %s의 정보이상. %d %d", pMember->GetName(), pMember->m_idDuelParty, m_idDuelParty );
pMember->ClearDuelParty();
#endif // worldserver
}
}
m_idDuelParty = 0; // 파티 해제
#endif // __CORESERVER
}
示例4: GetMover
// AI가 제어할 수 있는가?
BOOL CAIMonster2::IsControllable()
{
CMover* pMover = GetMover();
// 죽었을 경우 or 데미지 플라이 상태?
if( pMover->IsDie() || (pMover->m_pActMover->GetState() & OBJSTA_DMG_FLY_ALL) )
return FALSE;
return TRUE;
}
示例5: RemoveNPC
void CQuiz::RemoveNPC()
{
CMover* pMover = prj.GetMover( m_sNPC.idNpc );
if( IsValidObj( pMover ) )
{
g_UserMng.AddCreateSfxObj( pMover, XI_SKILL_MER_ONE_SPECIALHIT02 );
pMover->Delete();
}
}
示例6: _SetDestParam
static int _SetDestParam( lua_State *L )
{
CMover *pMover = (CMover *)lua_touserdata(L, 1);
int nDST = (int)lua_tonumber(L, 2);
int nAdd = (int)lua_tonumber(L, 3);
pMover->SetDestParam( nDST, nAdd, NULL_CHGPARAM );
return 0;
}
示例7: _ResetDestParam
static int _ResetDestParam( lua_State *L )
{
CMover *pMover = (CMover *)lua_touserdata(L, 1);
int nDST = (int)lua_tonumber(L, 2);
int nAdj = (int)lua_tonumber(L, 3);
pMover->ResetDestParam( nDST, nAdj, TRUE );
return 0;
}
示例8: g_WorldMng
void CWndIndirectTalk::OnDraw( C2DRender* p2DRender )
{
CWorld* pWorld = g_WorldMng();
CMover* pMover = (CMover*)pWorld->GetObjFocus();
CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT1 );
TCHAR szNum[ 32 ];
if( pMover && pMover->GetType() == OT_MOVER )
itoa( pMover->GetId(), szNum, 10 );
else
itoa( 0, szNum, 10 );
pWndEdit->SetString( szNum );
}
示例9: DamageToTarget
//
// nDmgCnt : 일반적으론 0 : 지속데미지를 사용할경우에 0이 아닌값이 들어온다.
//
void CSfx::DamageToTarget( int nDmgCnt, float fDmgAngle, float fDmgPower, int nMaxDmgCnt )
{
CMover* pObjSrc = (CMover*)prj.GetCtrl( m_idSrc );
CCtrl* pObjDest = prj.GetCtrl( m_idDest );
if( IsInvalidObj(pObjSrc) ) return; // 지금은 걍 리턴하지만 이렇게 실패한경우는 m_idSfxHit을 Clear해주는작업이 필요하다.
if( IsInvalidObj(pObjDest) ) return;
if( pObjDest->GetType() == OT_MOVER )
{
CMover* pMover = (CMover*) pObjDest;
#ifdef __CLIENT
PLAYSND( pMover->GetProp()->dwSndDmg2, &pMover->GetPos() ); // 마법류 맞을때 타격음.
#endif
#ifdef __CLIENT
// 쏜놈이 플레이어이거나 / 쏜놈은 플레이어가 아닌데 맞은놈이 플레이어일경우 전송
if( pObjSrc->IsActiveMover() || (pObjSrc->IsPlayer() == FALSE && pObjDest->IsActiveObj()) )
{
pMover->SetDmgCnt( 10 ); // 발사체 맞아도 이제 흔들린다,
g_DPlay.SendSfxHit( m_idSfxHit, m_nMagicPower, m_dwSkill, pObjSrc->GetId(), nDmgCnt, fDmgAngle, fDmgPower );
if( nMaxDmgCnt == 1 ) // 한방짜리 데미지만 id를 클리어 함.
m_idSfxHit = 0; // 0으로 해놔야 this가 삭제될때 SendSfxClear를 또 보내지 않는다.
}
#endif // __CLIENT
}
}
示例10: m
void MainWindow::on_actionMoveIt_triggered()
{
Gepard::MathModel *mathModel = g_manager.GetMathModelPtr();
CMover m (mathModel->Solids[0]);
GPDVector vect;
vect.x =0;
vect.y =0;
vect.z =-1;
GPDPoint point(0,0,0);
//CMovements mc = CMovements(EMovementTypes::CIRCULAR,point,"",vect,1.0,0,1);
CMovements ml(EMovementTypes::LINEAR,point,"",vect,20.0,0,5);
// CMovements mr = CMovements();
// mr.SetAxis(GPDVector(0,-1,0));
// mr.SetMovementType(CIRCULAR);
// mr.SetPoint(point);
// mr.SetShift(2.0);
// mr.SetStart(0);
// mr.SetEnd(0);
m.AddMovement(ml);
//m.AddMovement(mr);
//m.AddMovement(mc);
int cnt = m.GetSizeOfmovementsVector();
for (int i =0;i<cnt;i++)
{
int _cnt = m.GetStepsCntForMovement(i);
for (int j=0;j<_cnt;j++)
{
m.OneStepMove(i,j);
g_manager.HideSolid(mathModel->Solids[0]);
mathModel->PrepareGeometry();
g_manager.ShowSolidInRender(mathModel->Solids[0],GeometryRenderManager::GetCamera(0));
//break;
//Sleep(1000);
}
}
// m.MoveIt(0);
// g_manager.HideSolid(mathModel->Solids[0]);
// g_manager.ShowSolidInRender(mathModel->Solids[0],GeometryRenderManager::GetCamera(0));
// Gepard::Analysis::KeyCharacteristicsPtrArray* kca = mathModel->GetKCArrayPtr();
//
// kca->set_start();
// while (auto curKC = kca->get_next())
// {
// (*curKC)->Analize();
// }
}
示例11:
void CMover::CMD_SetCollect( CObj *pObj )
{
if( IsInvalidObj( pObj ) ) return;
if( pObj->GetType() != OT_MOVER ) return;
if( m_pActMover->IsActAttack() ) return;
if( m_pActMover->IsActJump() ) return;
if( m_pActMover->IsActDamage() ) return;
if( IsDie() ) return; // 죽었을때 사용금지.
//
if( GetCollector())
{
CMover *pTarget = (CMover *)pObj;
ClearActParam();
SetDestObj( pTarget->GetId(), 3.0f ); // 이동할 목표물을 idTarget으로 설정.
SetCmd( OBJACT_COLLECT, pTarget->GetId() ); // 사정거리가 되었을때 실행할 명령 셋팅.
}
}
示例12:
BOOL CAIMonster2::IsInValidTarget()
{
if( m_idTarget == NULL_ID )
return TRUE;
CMover* pTarget = prj.GetMover( m_idTarget );
if( IsValidObj( pTarget ) == FALSE )
return TRUE;
if( pTarget->IsDie() )
return TRUE;
if( GetMover()->IsFlyingNPC() != pTarget->m_pActMover->IsFly() )
return TRUE;
return FALSE;
}
示例13: Move
// 동작
void CPuzzleGame::Move()
{
// 입력
Input->UpdateState();
const CInputState* is = Input->GetState(0);
// 일시 정지(스크린샷용)
if (!PrevInput && is->Button[5]) Paused = !Paused;
// 스테이지의 동작
if (!Paused)
{
if (StageActive)
{
StageActive = Stage[StageIndex]->Move(is);
for (CTaskIter i(MoverList); i.HasNext();)
{
CMover* mover = (CMover*)i.Next();
if (!mover->Move(is)) i.Remove();
}
if (!PrevInput && is->Button[4]) StageActive = false;
}
else
{
if (!PrevInput)
{
if (is->Button[4])
{
StageActive = true;
SetStage(StageIndex);
}
else
if (is->Left) SetStage(StageIndex - STAGE_ORDER); else
if (is->Right) SetStage(StageIndex + STAGE_ORDER); else
if (is->Up) SetStage(StageIndex - 10 * STAGE_ORDER); else
if (is->Down) SetStage(StageIndex + 10 * STAGE_ORDER);
}
}
}
// 이전 입력
PrevInput = is->Button[4] || is->Button[5];
if (!StageActive) PrevInput = PrevInput || is->Left || is->Right || is->Up || is->Down;
}
示例14: DestroyWall
void CCommonCtrl::DestroyWall( void )
{
#ifdef __WORLDSERVER
// 시전자의 사이킥월 생성정보에서 지워줌.
CMover *pAttacker = prj.GetMover( m_idAttacker );
if( IsValidObj(pAttacker) )
{
if( pAttacker->IsPlayer() )
{
for( int i = 0; i < 2; i ++ )
{
if( ((CUser *)pAttacker)->m_pWall[i] == this )
((CUser *)pAttacker)->m_pWall[i] = NULL;
}
}
}
Delete();
#endif // WorldServer
}
示例15: PreProcessDamage
// return: attacker의 포인터
CMover* CActionMover::PreProcessDamage( CMover* pMover, OBJID idAttacker, BOOL bTarget, int nReflect )
{
if( pMover->m_dwMode & MATCHLESS_MODE ) // 무적이면 여기서 리턴.
return NULL;
#if __VER >= 10 // __LEGEND // 10차 전승시스템 Neuz, World, Trans
if( pMover->GetAdjParam( DST_CHRSTATE ) & CHS_SETSTONE)
return NULL;
#endif //__LEGEND // 10차 전승시스템 Neuz, World, Trans
CCtrl* pCtrl = prj.GetCtrl( idAttacker ); // 공격자
if( IsValidObj( pCtrl ) == FALSE )
return NULL;
CMover* pAttacker = NULL;
if( pCtrl->GetType() == OT_MOVER )
pAttacker = (CMover*)pCtrl;
else
return NULL;
if( pMover->IsNPC() ) // 맞는넘이 NPC고
{
MoverProp *pProp = pMover->GetProp();
if( pProp && pProp->bKillable != 1 ) // 죽이기가 불가능 한넘이면 여기서 리턴.
return NULL;
}
#ifdef __WORLDSERVER
HITTYPE ht = pAttacker->GetHitType( pMover, bTarget, nReflect );
if( ht == HITTYPE_FAIL )
return 0;
#if __VER < 10 // __METEONYKER_0608
pMover->PostAIMsg( AIMSG_DAMAGE, idAttacker );
#endif // __METEONYKER_0608
#endif
pAttacker->RemoveInvisible();
return pAttacker;
}