//#include "baseentity.h"
//
//CBaseTrigger::CBaseTrigger()
//{
//	init();
//}
//
//void CBaseTrigger::init()
//{
//	m_sClassName = "trigger";
//	pTarget = NULL;
//	m_bCountDown = false;
//	m_iDelay = 0;
//}
//
//
//bool CBaseTrigger::triggerCollision( CBaseObject *activeObject )
//{
//	//for( std::list<alg::PasiveModelBrush>::iterator tmpBrush = m_PolygonBrushes.begin(); tmpBrush != m_PolygonBrushes.end(); ++tmpBrush )
//	////for( BasicLinkedList<alg::PasiveModelBrush>::BasicLink *tmpBrush = m_PolygonBrushes.root; tmpBrush != NULL; tmpBrush = tmpBrush->next )
//	//{
//	//	if( tmpBrush->m_Bounds.compare( activeObject->m_ActiveBrush.m_MovedBrush.m_Bounds ) )
//	//	{
//
//	//		for( std::list<LinkedPoint>::iterator tmpPoint = activeObject->m_ActiveBrush.m_points.begin(); tmpPoint != activeObject->m_ActiveBrush.m_points.end(); ++tmpPoint )
//	//		{
//	//			if( tmpBrush->isPointInBrush( *tmpPoint ) )
//	//				return true;
//	//		}
//	//		
//	//		if( tmpBrush->isPointInBrush( activeObject->m_ActiveBrush.m_Bounds.getCenterPoint() ) )
//	//			return true;
//	//	}
//	//}
//	return false;
//}
//
//bool CBaseTrigger::collisionDetection( CBaseObject *activeObject, alg::Vector &resultNormal, float &fDistance, float &fStairsMax )
//{
//	if( triggerCollision( activeObject ) && !m_bCountDown)
//		target();
//
//	return false;
//}
//
//
//void CBaseTrigger::target()
//{
//	m_bCountDown = true;
//	downCountingTime = global_time::getGlobalTime();
//}
//
//void CBaseTrigger::delay()
//{
//	if(m_bCountDown)
//	{
//		if( downCountingTime + m_iDelay < global_time::getGlobalTime() )
//		{
//			m_bCountDown = false;
//			trigger();
//		}
//	}
//}
//
//void CBaseTrigger::run()
//{
//	delay();
//}
//

