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); } }
public Timer(IUpdateAble nextDisplay, IUpdateAble clock) { // we willen elke seconde een update timeoutInMillisecons = 1000; this.nextDisplay = nextDisplay; this.clock = clock; }
public void DoRemoveObject(IUpdateAble pObject) { if (g_setUpdateObject.Contains(pObject) == false) { return; } g_setUpdateObject.Remove(pObject); g_listObject.Remove(pObject); #if UNITY_EDITOR _listObject_ForDebug.Remove(pObject); #endif }
// ========================================================================== // /* public - [Do] Function * 외부 객체가 호출(For External class call)*/ public void DoAddObject(IUpdateAble pObject) { if (g_setUpdateObject.Contains(pObject)) { return; } g_setUpdateObject.Add(pObject); g_listObject.AddLast(pObject); #if UNITY_EDITOR _listObject_ForDebug.Add(pObject); #endif }
// ========================================================================== // /* public - [Do] Function * 외부 객체가 호출(For External class call)*/ public void DoAddObject(IUpdateAble pObject, bool bForceAdd = false) { if (g_setUpdateObject.Contains(pObject)) { if (bForceAdd) { g_setUpdateObject.Remove(pObject); } else { return; } } g_setUpdateObject.Add(pObject); g_listObject.Add(pObject); #if UNITY_EDITOR _listObject_ForDebug.Add(pObject); #endif }
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); } }
public NumberDisplay(int modules, IUpdateAble nextNumberDisplay) { this.modules = modules; this.nextNumberDisplay = nextNumberDisplay; }
public void DoRemoveObject(IUpdateAble pObject) { _listObject.Remove(pObject); }
// ========================================================================== // /* public - [Do] Function * 외부 객체가 호출(For External class call)*/ public void DoAddObject(IUpdateAble pObject) { _listObject.Add(pObject); }