Exemplo n.º 1
0
 private void OnDestroy()
 {
     using (PooledList <CoroutineInstance> instances = PooledList <CoroutineInstance> .Create())
     {
         instances.AddRange(s_CurrentlyRunning);
         foreach (var instance in instances)
         {
             instance.Dispose();
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Stops all executing sequences.
        /// </summary>
        public void StopAll()
        {
            using (PooledList <SequenceData> data = PooledList <SequenceData> .Create())
            {
                data.AddRange(m_RunningSequences);

                for (int i = 0; i < data.Count; ++i)
                {
                    data[i].Stop();
                }
            }
        }
Exemplo n.º 3
0
 private void UpdateInstances()
 {
     using (PooledList <CoroutineInstance> instances = PooledList <CoroutineInstance> .Create())
     {
         instances.AddRange(s_CurrentlyRunning);
         for (int i = 0; i < instances.Count; ++i)
         {
             var instance = instances[i];
             if (!instance.m_Disposing)
             {
                 instance.Update();
             }
             if (instance.m_Disposing)
             {
                 instance.Dispose();
             }
         }
     }
 }