Exemplo n.º 1
0
    public void ShowDownInfo(float downzise, float totalsize, bool show, float speendown, bool init = false)
    {
        if (show)
        {
            if (init)
            {
                m_curspeeddownSize = speendown;
                m_curdownSize      = downzise;

                m_totaldownSize = totalsize;
            }
            else
            {
                m_curspeeddownSize += speendown;
                m_curdownSize       = downzise;
            }

            SetDonwInfo();
        }
        else
        {
            m_downBeginTime    = 0;
            m_curspeeddownSize = 0;
            m_curdownSize      = 0;
            m_totaldownSize    = 0;
            m_downTick         = null;
        }
    }
Exemplo n.º 2
0
 public void BeginDownload()
 {
     if (m_downBeginTime <= 0 || m_downTick == null)
     {
         m_downBeginTime = Time.realtimeSinceStartup;
         SetDonwInfo();
         m_downTick = new BTimerTick(1f, SetDonwInfo);
     }
 }