//==================================================================== void Update() { if (null != m_lstHelper) { for (int i = 0; i < m_lstHelper.Count(); ++i) { DelayHelper helper = m_lstHelper[i]; helper.delay -= UnityEngine.Time.deltaTime; if (helper.delay <= 0) { m_lstHelper.RemoveAt(i); i--; helper.Invoke(); } } } if (null != m_lstUnscaledHelper) { for (int i = 0; i < m_lstUnscaledHelper.Count(); ++i) { DelayHelper helper = m_lstUnscaledHelper[i]; helper.delay -= UnityEngine.Time.unscaledDeltaTime; if (helper.delay <= 0) { m_lstUnscaledHelper.RemoveAt(i); i--; helper.Invoke(); } } } }
//==================================================================== void Update() { if (null != helperList) { for (int i = 0; i < helperList.Count(); ++i) { DelayHelper helper = helperList[i]; helper.delay -= UnityEngine.Time.deltaTime; if (helper.delay <= 0) { helperList.RemoveAt(i); i--; helper.Invoke(); } } } if (null != unscaledHelperList) { for (int i = 0; i < unscaledHelperList.Count(); ++i) { DelayHelper helper = unscaledHelperList[i]; helper.delay -= UnityEngine.Time.unscaledDeltaTime; if (helper.delay <= 0) { unscaledHelperList.RemoveAt(i); i--; helper.Invoke(); } } } }