コード例 #1
0
ファイル: CAAnimation.cpp プロジェクト: lmxing1987/CrossApp
    void Animation::update(float dt)
    {
        if (m_obInfo.now >= m_obInfo.total)
        {
            _deque.eraseObject(this);
            return;
        }
        
        if (m_obInfo.delay > 0)
        {
            m_obInfo.delay -= dt;
            return;
        }
        
        if (m_obInfo.delay < 0)
        {
            dt += m_obInfo.delay;
            m_obInfo.delay = 0.0f;
        }
        
        m_obInfo.interval = dt;
        m_obInfo.now += dt;
        m_obInfo.now = MIN(m_obInfo.now, m_obInfo.total);

        if (m_obInfo.target && m_obInfo.selector)
        {
            ((CAObject *)m_obInfo.target->*m_obInfo.selector)(m_obInfo.interval, m_obInfo.now, m_obInfo.total);
        }
    }
コード例 #2
0
void CommonImageCacheManager::removeImage(CAImage* image)
{
    m_dImageQueue.eraseObject(image);
}