void CBaseGolem::Update(float fDT)
{
	CBaseEntity::Update(fDT);

	/*if( GetFlag_prev_MovementState() == FLAG_MOVESTATE_MOVING)
	{		
		if(this->GetFlag_MovementState() == FLAG_MOVESTATE_ATDESTINATION)
		{
		int objectID = MObjectManager::GetInstance()->FindLayer( this->m_nIdentificationNumber ).GetFlake( OBJECT_OBJECT ).GetInfoAtIndex( GetIndexPosX() , GetIndexPosY() ) ;
		IUnitInterface* object = (MObjectManager::GetInstance()->GetUnit(objectID)) ;
		
		CheckCollision( object , true );
		}
	}*/

	if(( GetDistanceLeft() <= 32 && GetDistanceLeft() >= 30 ) || (GetDistanceLeft() <= 16 && GetDistanceLeft() >= 14 ) )
		CSGD_FModManager::GetInstance()->PlaySound2D( m_nStepSoundID, CGamePlayState::GetInstance()->testVaribale, this->m_nIdentificationNumber) ;

	//UpdateAI();



	if( LastDistance > 0.0f && GetDistanceLeft() < 0.1f )
	{
		CheckCollision( 
			MObjectManager::GetInstance()->GetUnit( 
			MObjectManager::GetInstance()->FindLayer( m_nIdentificationNumber ).GetFlake( OBJECT_OBJECT ).GetInfoAtIndex( GetIndexPosX(), GetIndexPosY() ) ), true );
	}

	LastDistance = GetDistanceLeft();

}
示例#2
0
Ogre::Real CEntity::GetMoveTimeLeft(void)
{
	if( !IsMoving() ) return 0;
	return GetDistanceLeft() / mMoveSpeed;
}