示例#1
0
void MonsterManager::OnMouseMove(POINT ptMap, POINT mousePt)
{
	map<UINT,Monster*>::iterator itBegin = m_objMap.begin();
	map<UINT,Monster*>::iterator itEnd = m_objMap.end();
	while (itBegin != itEnd) {
		Monster* pMon = itBegin->second;
		pMon->OnMouseMove(ptMap, mousePt);
		++itBegin;
	}
}
示例#2
0
Monster* MonsterManager::FindSelectMonster(POINT ptMap, POINT mousePt)
{
	map<UINT,Monster*>::iterator itBegin = m_objMap.begin();
	map<UINT,Monster*>::iterator itEnd = m_objMap.end();
	while (itBegin != itEnd) {
		Monster* pMon = itBegin->second;
		bool success = pMon->OnMouseMove(ptMap, mousePt);
		if (success) return pMon;
		++itBegin;
	}

	return NULL;
}