private static void DrawActiveTips()
        {
            TooltipHandler.drawingTips.Clear();
            foreach (KeyValuePair <int, ActiveTip> keyValuePair in TooltipHandler.activeTips)
            {
                if ((double)Time.realtimeSinceStartup > keyValuePair.Value.firstTriggerTime + (double)TooltipHandler.TooltipDelay)
                {
                    TooltipHandler.drawingTips.Add(keyValuePair.Value);
                }
            }
            List <ActiveTip> list = TooltipHandler.drawingTips;

            if (TooltipHandler.< > f__mg$cache0 == null)
            {
                TooltipHandler.< > f__mg$cache0 = new Comparison <ActiveTip>(TooltipHandler.CompareTooltipsByPriority);
            }
            list.Sort(TooltipHandler.< > f__mg$cache0);
            Vector2 pos = TooltipHandler.CalculateInitialTipPosition(TooltipHandler.drawingTips);

            for (int i = 0; i < TooltipHandler.drawingTips.Count; i++)
            {
                pos.y += TooltipHandler.drawingTips[i].DrawTooltip(pos);
                pos.y += 2f;
            }
            TooltipHandler.drawingTips.Clear();
        }
Beispiel #2
0
        private static void DrawActiveTips()
        {
            List <ActiveTip> list = new List <ActiveTip>();

            foreach (KeyValuePair <int, ActiveTip> current in TooltipHandler.activeTips)
            {
                if ((double)Time.realtimeSinceStartup > current.Value.firstTriggerTime + (double)TooltipHandler.TooltipDelay)
                {
                    list.Add(current.Value);
                }
            }
            list.Sort(new Comparison <ActiveTip>(TooltipHandler.CompareTooltipsByPriority));
            Vector2 pos = TooltipHandler.CalculateInitialTipPosition(list);

            for (int i = 0; i < list.Count; i++)
            {
                pos.y += list[i].DrawTooltip(pos);
                pos.y += 2f;
            }
        }