Action Script 3.0 datatype to match C++ iterator? (Code convertion)
- by user919496
I am developing a game with Action Script 3.0 using Starling Framework, converting it from C++
C++ Code :
for (std::vector<MyObject*>::iterator i = m_listEnemy->begin();i!= m_listEnemy->end();)
{
(*i)->update(dt);
if ( (*i)->m_Hp <=0 )
{
(*i)->release();
i = m_listEnemy->erase(i);
continue;
}
i++;
}
MyObject is the class.
What Action Script 3.0 data type matches the C++ iterator?
Also , how can I convert this C++ code to Action Script 3.0 code?
Thanks in advance!