Esempio n. 1
0
 public static void LoadResource(DailyPanel dailyPanel)
 {
     // TO DO somethin....
     dailyPanel.Clear();
     string[] s = PlayerPrefsX.GetStringArray(KeySave.DAILY_REWARD);
     for (int i = 0; i < s.Length && i < dailyPanel.slots.Length; i++)
     {
         DailySlot slot = dailyPanel.slots[i];
         string[]  temp = s[i].Split(',');
         for (int j = 0; j < temp.Length; j++)
         {
             slot.ID        = int.Parse(temp[j]);
             slot.IsOpen    = Boolean.Parse(temp[++j]);
             slot.IsRecieve = Boolean.Parse(temp[++j]);
         }
     }
 }
Esempio n. 2
0
 public void RecieveReward(DailySlot slot)
 {
     if (slot.ID <= IndexReward && !slot.IsRecieve && slot.IsOpen)
     {
         slot.IsRecieve = true;
         if (IndexReward == (dailyPanel.slots.Length - 1))
         {
             if (dailyPanel.IsRecieveAll())
             {
                 IndexReward = -1;
                 dailyPanel.Clear();
                 dailyReward._checktime();
             }
         }
         dailyPanel.SaveData();
     }
     else
     {
     }
 }