Пример #1
0
        public static void LoadReferenceKart()
        {
            if (LoadedReferenceKart != null)
            {
                ReferenceKart = LoadedReferenceKart;
            }
            else if (File.Exists(REF_KART_FILE))
            {
                List <KartInfo> karts = null;
                try
                {
                    karts = KartInfo.LoadFromFile(REF_KART_FILE);
                }
                catch
                {
                }

                if (karts == null || karts.Count == 0)
                {
                    LoadedReferenceKart = null;
                }
                else
                {
                    LoadedReferenceKart = new KartWrapper(karts[0]);
                }

                ReferenceKart = LoadedReferenceKart;
                ChompShopAlerts.UpdateReferenceKart(ReferenceKart);
            }
        }
Пример #2
0
 public static void ClearReferenceKart()
 {
     ReferenceKart = null;
     ChompShopAlerts.UpdateReferenceKart(ReferenceKart);
 }
Пример #3
0
 public static void LoadReferenceKart(KartWrapper kart)
 {
     ReferenceKart = kart;
     ChompShopAlerts.UpdateReferenceKart(ReferenceKart);
 }