Пример #1
0
    void CallEventToError(SHLoadData pData, SHLoadEndInfo pEndData)
    {
        if ((null == pData) || (null == pEndData))
        {
            return;
        }

        if (eLoadErrorCode.None == pEndData.m_eErrorCode)
        {
            return;
        }

        var pEvent = new SHLoadEvent();

        pEvent.m_eType            = pData.m_eDataType;
        pEvent.m_strFileName      = pData.m_strName;
        pEvent.m_pCount           = m_pPrograss.GetCountInfo();
        pEvent.m_pTime            = m_pPrograss.GetLoadTime(pData.m_strName);
        pEvent.m_bIsSuccess       = pData.m_bIsSuccess;
        pEvent.m_bIsFail          = m_pPrograss.m_bIsFail;
        pEvent.m_fPercent         = GetLoadPrograss();
        pEvent.m_eErrorCode       = pEndData.m_eErrorCode;
        pEvent.m_bIsAsyncPrograss = false;
        EventToError.Callback <SHLoadEvent>(this, pEvent);
    }
Пример #2
0
    void CallEventToAsyncPrograss()
    {
        var pEvent = new SHLoadEvent();

        pEvent.m_pCount           = m_pPrograss.GetCountInfo();
        pEvent.m_fPercent         = GetLoadPrograss();
        pEvent.m_bIsAsyncPrograss = true;
        EventToProgress.Callback <SHLoadEvent>(this, pEvent);
    }
Пример #3
0
    void CallEventToComplate()
    {
        var pEvent = new SHLoadEvent();

        pEvent.m_bIsFail = m_pPrograss.m_bIsFail;
        pEvent.m_pCount  = m_pPrograss.GetCountInfo();
        pEvent.m_pTime   = new SHPair <float, float>(m_pPrograss.GetLoadTime(), 0.0f);
        EventToComplate.Callback <SHLoadEvent>(this, pEvent);
        EventToComplate.Clear();
    }
Пример #4
0
    void CallEventToPrograss(SHLoadData pData)
    {
        if (null == pData)
        {
            return;
        }

        var pEvent = new SHLoadEvent();

        pEvent.m_eType            = pData.m_eDataType;
        pEvent.m_strFileName      = pData.m_strName;
        pEvent.m_pCount           = m_pPrograss.GetCountInfo();
        pEvent.m_pTime            = m_pPrograss.GetLoadTime(pData.m_strName);
        pEvent.m_bIsSuccess       = pData.m_bIsSuccess;
        pEvent.m_bIsFail          = m_pPrograss.m_bIsFail;
        pEvent.m_fPercent         = GetLoadPrograss();
        pEvent.m_bIsAsyncPrograss = false;
        EventToProgress.Callback <SHLoadEvent>(this, pEvent);
    }