コード例 #1
0
ファイル: Achievement.cs プロジェクト: floatyears/Decrypt
 private static int SoreValue(AchievementInfo aItem, AchievementInfo bItem)
 {
     if (aItem.Value < bItem.Value)
     {
         return -1;
     }
     if (aItem.Value == bItem.Value)
     {
         return 0;
     }
     return 1;
 }
コード例 #2
0
ファイル: AchievementItem.cs プロジェクト: floatyears/Decrypt
 public override void Refresh(object _data)
 {
     AchievementDataEx achievementDataEx = (AchievementDataEx)_data;
     if (achievementDataEx == this.Data && this.CacheInfo == achievementDataEx.Info)
     {
         this.RefreshFinnishState();
         return;
     }
     this.Data = achievementDataEx;
     this.CacheInfo = this.Data.Info;
     this.ShowAchievementData();
 }
コード例 #3
0
 private void OnAchievementUpdateEvent(AchievementInfo info)
 {
     this.mAchievementTable[this.curSelectTab].repositionNow = true;
     LocalPlayer player = Globals.Instance.Player;
     if (info.Daily)
     {
         this.newFlag[0].SetActive(player.AchievementSystem.HasTakeReward(true) || GUIAchievementScene.HasNewScore());
     }
     else
     {
         this.newFlag[1].SetActive(player.AchievementSystem.HasTakeReward(false));
     }
 }
コード例 #4
0
 private void OnAchievementTakeRewardEvent(AchievementInfo info)
 {
     List<RewardData> list = new List<RewardData>();
     for (int i = 0; i < info.RewardType.Count; i++)
     {
         if (info.RewardType[i] != 0 && info.RewardType[i] != 20)
         {
             list.Add(new RewardData
             {
                 RewardType = info.RewardType[i],
                 RewardValue1 = info.RewardValue1[i],
                 RewardValue2 = info.RewardValue2[i]
             });
         }
     }
     GUIRewardPanel.Show(list, string.Format("{0}{1}", Singleton<StringManager>.Instance.GetString("QuestFinish"), info.Name), false, true, null, false);
     this.OnTakeAchievementRewardChecked(null);
     this.mAchievementTable[this.curSelectTab].repositionNow = true;
     LocalPlayer player = Globals.Instance.Player;
     if (info.Daily)
     {
         this.newFlag[0].SetActive(player.AchievementSystem.HasTakeReward(true));
     }
     else
     {
         this.newFlag[1].SetActive(player.AchievementSystem.HasTakeReward(false));
     }
 }