Пример #1
0
        /// <summary>
        /// Finalizes the log entry and records it.
        /// </summary>
        public void Dispose()
        {
            var end = Time.time;

            var source = TimelineLog.sources[this.source] as TimelineLogSource;

            if (source == null)
            {
                TimelineLog.sources[this.source]
                      = source
                      = new TimelineLogSource()
                    ;
                TimelineLog.TotalSources++;
            }

            var entries = source.Categories[this.category] as LinkedList <TimelineLogEntry>;

            if (entries == null)
            {
                source.Categories[this.category]
                      = entries
                      = new LinkedList <TimelineLogEntry>()
                    ;
                TimelineLog.TotalCategories++;
            }

            var entry = new TimelineLogEntry(this.message, this.start, end, this.Color);

            entries.AddLast(entry);

            TimelineLog.MaxTime = Mathf.Max(TimelineLog.MaxTime, entry.End);
        }
Пример #2
0
        /// <summary>
        /// Finalizes the log entry and records it.
        /// </summary>
        public void Dispose()
        {
            var end = Time.time;

            var source = TimelineLog.sources[this.source] as TimelineLogSource;
            if (source == null)
            {
                TimelineLog.sources[this.source]
                    = source
                    = new TimelineLogSource()
                    ;
                TimelineLog.TotalSources++;
            }

            var entries = source.Categories[this.category] as LinkedList<TimelineLogEntry>;
            if (entries == null)
            {
                source.Categories[this.category]
                    = entries
                    = new LinkedList<TimelineLogEntry>()
                    ;
                TimelineLog.TotalCategories++;
            }

            var entry = new TimelineLogEntry(this.message, this.start, end, this.Color);
            entries.AddLast(entry);

            TimelineLog.MaxTime = Mathf.Max(TimelineLog.MaxTime, entry.End);
        }