예제 #1
0
        // -------------------------------------------

        /*
         * 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;
                }
            }
        }
예제 #2
0
        // -------------------------------------------

        /*
         * 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;
                }
            }
        }