12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 loyalsoft. All rights reserved.
- // Homepage: http://www.game7000.com/
- // Feedback: http://www.game7000.com/
- //------------------------------------------------------------
- namespace GameFramework.Download
- {
- internal sealed partial class DownloadManager : GameFrameworkModule, IDownloadManager
- {
- private sealed partial class DownloadCounter
- {
- private sealed class DownloadCounterNode : IReference
- {
- private long m_DeltaLength;
- private float m_ElapseSeconds;
- public DownloadCounterNode()
- {
- m_DeltaLength = 0L;
- m_ElapseSeconds = 0f;
- }
- public long DeltaLength
- {
- get
- {
- return m_DeltaLength;
- }
- }
- public float ElapseSeconds
- {
- get
- {
- return m_ElapseSeconds;
- }
- }
- public static DownloadCounterNode Create()
- {
- return ReferencePool.Acquire<DownloadCounterNode>();
- }
- public void Update(float elapseSeconds, float realElapseSeconds)
- {
- m_ElapseSeconds += realElapseSeconds;
- }
- public void AddDeltaLength(int deltaLength)
- {
- m_DeltaLength += deltaLength;
- }
- public void Clear()
- {
- m_DeltaLength = 0L;
- m_ElapseSeconds = 0f;
- }
- }
- }
- }
- }
|