private static Color getRankColor(CollabMapDataProcessor.SpeedBerryInfo speedBerryInfo, long pb)
        {
            float pbSeconds = (float)TimeSpan.FromTicks(pb).TotalSeconds;

            if (pbSeconds < speedBerryInfo.Gold)
            {
                return(Calc.HexToColor("D2B007"));
            }
            else if (pbSeconds < speedBerryInfo.Silver)
            {
                return(Color.Silver);
            }
            return(Calc.HexToColor("B96F11"));
        }
        private static string getRankIcon(CollabMapDataProcessor.SpeedBerryInfo speedBerryInfo, long pb)
        {
            float pbSeconds = (float)TimeSpan.FromTicks(pb).TotalSeconds;

            if (pbSeconds < speedBerryInfo.Gold)
            {
                return("CollabUtils2/speedberry_gold");
            }
            else if (pbSeconds < speedBerryInfo.Silver)
            {
                return("CollabUtils2/speedberry_silver");
            }
            return("CollabUtils2/speedberry_bronze");
        }
Exemplo n.º 3
0
        private static int getRankLevel(CollabMapDataProcessor.SpeedBerryInfo speedBerryInfo, long pb)
        {
            float pbSeconds = (float)TimeSpan.FromTicks(pb).TotalSeconds;

            if (pbSeconds < speedBerryInfo.Gold)
            {
                return(1);
            }
            else if (pbSeconds < speedBerryInfo.Silver)
            {
                return(2);
            }
            return(3);
        }