void World::ClearSelectedState() { for (size_t i=0; i<m_vecSelectUnis.size(); ++i) { SelectableObject* pObject = dynamic_cast<SelectableObject*>(m_vecSelectUnis[i]); pObject->SetSelected(false); } m_vecSelectUnis.clear(); }
void World::SetObjectSelected( int ID ) { SelectableObject* pObject = dynamic_cast<SelectableObject*>(ObjectManager::GetSingleton().GetObject(ID)); pObject->SetSelected(true); m_vecSelectUnis.push_back(pObject); }