public DownloadCounter(float updateInterval, float recordInterval) { if (updateInterval <= 0f) { throw new GXException("Update interval is invalid."); } if (recordInterval <= 0f) { throw new GXException("Record interval is invalid."); } m_DownloadCounterNodes = new GXLinkedList <DownloadCounterNode>(); m_UpdateInterval = updateInterval; m_RecordInterval = recordInterval; Reset(); }
/// <summary> /// 初始化界面组的新实例。 /// </summary> /// <param name="name">界面组名称。</param> /// <param name="depth">界面组深度。</param> /// <param name="uiGroupHelper">界面组辅助器。</param> public UIGroup(string name, int depth, IUIGroupHelper uiGroupHelper) { if (string.IsNullOrEmpty(name)) { throw new GXException("UI group name is invalid."); } if (uiGroupHelper == null) { throw new GXException("UI group helper is invalid."); } m_Name = name; m_Pause = false; m_UIGroupHelper = uiGroupHelper; m_UIFormInfos = new GXLinkedList <UIFormInfo>(); m_CachedNode = null; Depth = depth; }
/// <summary> /// 初始化实体组的新实例。 /// </summary> /// <param name="name">实体组名称。</param> /// <param name="instanceAutoReleaseInterval">实体实例对象池自动释放可释放对象的间隔秒数。</param> /// <param name="instanceCapacity">实体实例对象池容量。</param> /// <param name="instanceExpireTime">实体实例对象池对象过期秒数。</param> /// <param name="instancePriority">实体实例对象池的优先级。</param> /// <param name="entityGroupHelper">实体组辅助器。</param> /// <param name="objectPoolManager">对象池管理器。</param> public EntityGroup(string name, float instanceAutoReleaseInterval, int instanceCapacity, float instanceExpireTime, int instancePriority, IEntityGroupHelper entityGroupHelper, IObjectPoolManager objectPoolManager) { if (string.IsNullOrEmpty(name)) { throw new GXException("Entity group name is invalid."); } if (entityGroupHelper == null) { throw new GXException("Entity group helper is invalid."); } m_Name = name; m_EntityGroupHelper = entityGroupHelper; m_InstancePool = objectPoolManager.CreateSingleSpawnObjectPool <EntityInstanceObject>(Utility.Text.Format("Entity Instance Pool ({0})", name), instanceCapacity, instanceExpireTime, instancePriority); m_InstancePool.AutoReleaseInterval = instanceAutoReleaseInterval; m_Entities = new GXLinkedList <IEntity>(); m_CachedNode = null; }
/// <summary> /// 初始化任务管理器的新实例。 /// </summary> public TaskManager() { m_Tasks = new GXLinkedList <TaskBase>(); m_Serial = 0; }