protected override IEnumerator OnEnableObjectCoroutine() { while (true) { _listDestroyIndex.Clear(); int iUpdateObjectCount = 0; int iListCount = g_listObject.Count; for (int i = 0; i < iListCount; i++) { IUpdateAble pUpdateAble = g_listObject[i]; if (pUpdateAble.IUpdateAble_IsRequireUpdate()) { pUpdateAble.OnUpdate(); ++iUpdateObjectCount; } } //for(int i = 0; i < _listDestroyIndex.Count; i++) // g_listObject.RemoveAt(_listDestroyIndex[i]); #if UNITY_EDITOR if (iUpdateObjectCount != _iPrevObjectCount) { _iPrevObjectCount = iUpdateObjectCount; name = string.Format("업데이트 매니져/{0}개 업데이트중", iUpdateObjectCount); } #endif yield return(null); } }
protected override IEnumerator OnEnableObjectCoroutine() { while (true) { _listDestroyIndex.Clear(); float fDeltaTime = Time.deltaTime; int iUpdateObjectCount = 0; int iListCount = g_listObject.Count; for (int i = 0; i < iListCount; i++) { IUpdateAble pUpdateAble = g_listObject[i]; bool bIsUpdate = false; float fTimeScale = 1f; pUpdateAble.IUpdateAble_GetUpdateInfo(ref bIsUpdate, ref fTimeScale); if (bIsUpdate) { pUpdateAble.OnUpdate(fTimeScale); ++iUpdateObjectCount; } } //for(int i = 0; i < _listDestroyIndex.Count; i++) // g_listObject.RemoveAt(_listDestroyIndex[i]); #if UNITY_EDITOR if (iUpdateObjectCount != _iPrevObjectCount) { _iPrevObjectCount = iUpdateObjectCount; name = string.Format("업데이트 매니져/{0}개 업데이트중", iUpdateObjectCount); } #endif yield return(null); } }