Exemplo n.º 1
0
        internal override void OnSceneChanging()
        {
            _activeCoroutines.Clear();

            Flags.Clear();
            Counters.Clear();
            Timers.Clear();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Frees all the project's resources helping the GC
 /// </summary>
 public void Clear()
 {
     timeline.Clear();
     Categories.Clear();
     VisitorTeamTemplate.Clear();
     LocalTeamTemplate.Clear();
     Periods.Clear();
     Timers.Clear();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Frees all the project's resources helping the GC
 /// </summary>
 public void Clear()
 {
     Timeline.Clear();
     Dashboard.List.Clear();
     VisitorTeamTemplate.List.Clear();
     LocalTeamTemplate.List.Clear();
     Periods.Clear();
     Timers.Clear();
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     Players.Clear();
     Enemies.Clear();
     Quests.Clear();
     Pets.Clear();
     Projectiles.Clear();
     StaticObjects.Clear();
     Timers.Clear();
 }
Exemplo n.º 5
0
 public virtual void Dispose()
 {
     Players.Clear();
     Enemies.Clear();
     Quests.Clear();
     Projectiles.Clear();
     StaticObjects.Clear();
     Timers.Clear();
     EnemiesCollision = null;
     PlayersCollision = null;
 }
Exemplo n.º 6
0
        public void Stop()
        {
            if (Timers != null)
            {
                foreach (var taskTimer in Timers)
                {
                    taskTimer.Dispose();
                }

                Timers.Clear();
                Timers = null;
            }

            Config    = null;
            _instance = null;
        }
Exemplo n.º 7
0
        public void UpdateList()
        {
            Events.Clear();
            foreach (var timer in Timers)
            {
                timer.Stop();
            }
            Timers.Clear();
            var tempdate = SelectedTime;
            var temptype = SelectedEvent;

            while (tempdate.Hours != 5)
            {
                tempdate = tempdate.Add(new TimeSpan(0, 43, 0));
                if (Clockwise)
                {
                    temptype++;
                }
                else
                {
                    temptype--;
                }
                Events.Add(new PeachesEvent(tempdate, Math.Abs(temptype % 3)));
                if (Services.Profiles.CurrentProfile.Peaches.Notifications)
                {
                    var nameOfEvent = temptype == 0 ? "Клыкари" :
                                      temptype == 1 ? "Пустыня" : "Слоны";
                    var NowDate = DateTime.Now;
                    var timing  = tempdate - new TimeSpan(0, 5, 0);
                    var time    = new DateTime(NowDate.Year, NowDate.Month, NowDate.Day, timing.Hours, timing.Minutes, 0);
                    if (time > DateTime.Now)
                    {
                        var span  = time - DateTime.Now;
                        var timer = new Timer {
                            Interval = span.TotalMilliseconds, AutoReset = false
                        };
                        timer.Elapsed += (sender, e) =>
                        {
                            _eventAggregator.PublishOnUIThread(DateTime.Now.TimeOfDay.ToString(@"hh\:mm\:ss") + ":Через 5 минут будет событие на персиках: " + nameOfEvent);
                            Notifier.ShowInformation("Через 5 минут будет событие на персиках: " + nameOfEvent);
                        };
                        timer.Start();
                        Timers.Add(timer);
                    }
                }
            }
        }
Exemplo n.º 8
0
 protected override void DisposeManagedResources()
 {
     base.DisposeManagedResources();
     Dashboard?.Dispose();
     FileSet.Dispose();
     if (Timeline != null)
     {
         foreach (TimelineEvent evt in Timeline)
         {
             evt.Dispose();
         }
     }
     if (EventTypes != null)
     {
         foreach (var eventType in EventTypes)
         {
             eventType.Dispose();
         }
         EventTypes.Clear();
     }
     if (Timers != null)
     {
         foreach (var element in Timers)
         {
             element.Dispose();
         }
         Timers.Clear();
     }
     if (Periods != null)
     {
         foreach (var element in Periods)
         {
             element.Dispose();
         }
         Periods.Clear();
     }
     if (Playlists != null)
     {
         foreach (var element in Playlists)
         {
             element.Dispose();
         }
         Playlists.Clear();
     }
 }
Exemplo n.º 9
0
 internal override void OnSceneChanging()
 {
     Flags.Clear();
     Counters.Clear();
     Timers.Clear();
 }