Esempio n. 1
0
    float GetLoadPrograss()
    {
        // 로드할 파일이 없으면 100프로지~
        if (false == IsReMainLoadFiles())
        {
            return(100.0f);
        }

        float iProgress = 0.0f;

        SHUtils.ForToDic <string, SHLoadStartInfo>(m_pPrograss.LoadingFiles, (pKey, pValue) =>
        {
            if (true == m_pPrograss.IsDone(pKey))
            {
                return;
            }

            iProgress += pValue.GetPrograss();
        });

        SHPair <int, int> pCountInfo       = m_pPrograss.GetCountInfo();
        float             fCountGap        = SHMath.Divide(100.0f, pCountInfo.Value1);
        float             fComplatePercent = (fCountGap * pCountInfo.Value2);
        float             fProgressPercent = (fCountGap * iProgress);

        return(fComplatePercent + fProgressPercent);
    }
Esempio n. 2
0
    // 로드할 파일이 있는가?
    public bool IsReMainLoadFiles()
    {
        SHPair <int, int> pCountInfo = m_pPrograss.GetCountInfo();

        // TotalCount가 0이면 로드할 파일이 없다
        if (0 == pCountInfo.Value1)
        {
            return(false);
        }

        // TotalCount와 CurrentCount가 같으면 로드할 파일이 없다
        if (pCountInfo.Value1 == pCountInfo.Value2)
        {
            return(false);
        }

        return(true);
    }