示例#1
0
        private static void DomainReset()
        {
            if (ScheduledEvents != null)
            {
                ScheduledEvents.Clear();
            }

            instance             = null;
            ScheduledEventsCount = 0;
        }
示例#2
0
        /// <summary>
        /// Reset the system. Removes all scheduled events and destroys instance.
        /// </summary>
        public static void Clear()
        {
            if (ScheduledEvents != null)
            {
                ScheduledEvents.Clear();
            }

            if (instance != null)
            {
                Destroy(instance.gameObject);
            }

            instance = null;

            ScheduledEventsCount = 0;
        }