Action Script 3.0 datatype to match C++ iterator? (Code convertion)
        Posted  
        
            by 
                user919496
            
        on Game Development
        
        See other posts from Game Development
        
            or by user919496
        
        
        
        Published on 2013-11-01T19:41:21Z
        Indexed on 
            2013/11/01
            22:12 UTC
        
        
        Read the original article
        Hit count: 218
        
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!
© Game Development or respective owner