// ------------------------------------------- /* * Will proccess the delayed events */ private void ProccessDelayedEvents() { // DELAYED EVENTS for (int i = 0; i < m_listEvents.Count; i++) { TimedEventData eventData = m_listEvents[i]; eventData.Time -= Time.deltaTime; if (eventData.Time <= 0) { DispatchGameEvent(eventData.NameEvent, eventData.List); eventData.Destroy(); m_listEvents.RemoveAt(i); break; } } }
// ------------------------------------------- /* * Will process the queue of delayed events */ void Update() { // DELAYED EVENTS for (int i = 0; i < m_listEvents.Count; i++) { TimedEventData eventData = m_listEvents[i]; eventData.Time -= Time.deltaTime; if (eventData.Time <= 0) { EthereumEvent(eventData.NameEvent, eventData.List); eventData.Destroy(); m_listEvents.RemoveAt(i); break; } } }