Example #1
0
File: main.cpp Project: CCJY/coliru
 void Search(Cond const& cond) {
     while (cond(const_cast<TSearchModule const&>(*this))) {
         container.insert(container.end(), spObj());
     }
 }
Example #2
0
//============================================================================
//処理
//============================================================================
void CSprite::Exec()
{
	/*アニメーションの設定*/
	SetAnimation();
	
	/*描画先*/
	m_DstRect.Set( m_vPos.x, m_vPos.y, m_fSize.x * m_fScale.x, m_fSize.y * m_fScale.y );
	
	/*描画元*/
	m_SrcRect.Set( m_Anim.x * m_fSize.x, m_Anim.y * m_fSize.y, m_fSize.x, m_fSize.y );
	
	//描画リクエスト
	DrawRequest();
	
	map< string, sp<CGameObject> > mapDraw;
	
	mapDraw.clear();
	
	mapDraw = CCommonObject::GetResMgr()->GetDrawMap();

	map< string, sp<CGameObject> >::iterator it = mapDraw.begin();




#if defined( DEBUG ) | ( _DEBUG )

	Peripheral::IKeyboard *pKey = CCommonObject::GetAppli()->GetCore()->GetKeyboard();


	static bool IsHit = true;

	if( pKey->GetKeyData( SELENE_VK_Q ) )
	{
		IsHit = !IsHit;
	}



#endif

#if defined( DEBUG ) | ( _DEBUG )

	if( IsHit )
#endif
	{

		while( it != mapDraw.end() )
		{
			sp<CGameObject> spObj( it->second );
			
			bool IsThis = ( this->GetPos().x > 0 && this->GetPos().x < SCREEN_WIDTH - this->GetSize().x && this->GetPos().y > 0 
							&& this->GetPos().y < SCREEN_HEIGHT - this->GetSize().y );
			
				if( this->HitCheck( spObj ) )
				{
					this->HitExec( spObj );
				}
			

			it++;
		}
	}



	
}