Beispiel #1
0
    public void Statistic()
    {
        CollectionPrefs.AddResult(InputName.text, Kommut.TypeGame, Kommut.Level, Kommut.TimeRecord);
        string[] array = CollectionPrefs.GetStrings(Kommut.TypeGame);
        //CollectionPrefs.DeleteStr("classic");

        ContinueGame();
    }
Beispiel #2
0
 public void ShowStat()
 {
     string[] show = new string[5];
     for (int i = 0; i < 5; i++)
     {
         show[i] = "";
     }
     string[] arr = CollectionPrefs.GetStrings(GameMod);
     if (arr != null)
     {
         int k = 0;
         for (int i = 0; i < arr.Length; i++)
         {
             if ((arr[i] != "") && (arr[i] != " "))
             {
                 bool flag = false;
                 //foreach (char item in arr[i])
                 //{
                 //    if (item != ' ')
                 //        flag = true;
                 //}
                 if ((k < 5) && (flag == false))
                 {
                     show[k] = arr[i];
                     k++;
                 }
             }
         }
         if (show[0] != null)
         {
             print("'" + show[0] + "'");
             first.text = "1. " + show[0];
         }
         if (show[1] != null)
         {
             second.text = "2. " + show[1];
         }
         if (show[2] != null)
         {
             third.text = "3. " + show[2];
         }
         if (show[3] != null)
         {
             fourth.text = "4. " + show[3];
         }
         if (show[4] != null)
         {
             fifth.text = "5. " + show[4];
         }
     }
 }