Пример #1
0
 public void ShowTowerOutPutTip(GuildWarClientCity gwCC)
 {
     if (this.mGuildCraftMapTipForTaken != null)
     {
         this.mGuildCraftMapTipForTaken.ShowTip(this.mGuildCraftMapItems[gwCC.City.CityId - 1].gameObject, gwCC);
     }
 }
 public void ShowTip(GameObject parentGo, GuildWarClientCity gwCC)
 {
     if (gwCC == null)
     {
         return;
     }
     GuildWarStateInfo mWarStateInfo = Globals.Instance.Player.GuildSystem.mWarStateInfo;
     if (mWarStateInfo != null)
     {
         GuildInfo info = Globals.Instance.AttDB.GuildDict.GetInfo(gwCC.City.CityId);
         if (info == null)
         {
             return;
         }
         base.transform.parent = parentGo.transform;
         base.transform.localPosition = new Vector3(-130f, -120f, 0f);
         base.transform.localScale = Vector3.one;
         this.mTowerName.text = info.CastleName;
         if (gwCC.City.CityId == 1)
         {
             this.mTowerName.color = Tools.GetItemQualityColor(3);
         }
         else if (gwCC.City.CityId == 2)
         {
             this.mTowerName.color = Tools.GetItemQualityColor(2);
         }
         else
         {
             this.mTowerName.color = Tools.GetItemQualityColor(1);
         }
         this.mTakenGuild.text = ((!string.IsNullOrEmpty(gwCC.GuildName)) ? gwCC.GuildName : Singleton<StringManager>.Instance.GetString("guildCraft5"));
         for (int i = 0; i < info.RewardType.Count; i++)
         {
             if (info.RewardType[i] == 3)
             {
                 ItemInfo info2 = Globals.Instance.AttDB.ItemDict.GetInfo(info.RewardValue1[i]);
                 if (info2 != null)
                 {
                     this.mMoneySp.spriteName = info2.Icon;
                     this.mMoneyQuality.spriteName = Tools.GetItemQualityIcon(info2.Quality);
                     this.mMoneyDesc.text = Singleton<StringManager>.Instance.GetString("guildCraft4", new object[]
                     {
                         info.RewardValue2[i]
                     });
                 }
             }
             else if (info.RewardType[i] == 15)
             {
                 this.mDiamondDesc.text = Singleton<StringManager>.Instance.GetString("guildCraft4", new object[]
                 {
                     info.RewardValue1[i]
                 });
             }
         }
         base.gameObject.SetActive(true);
     }
 }
Пример #3
0
 public void Refresh(GuildWarClientCity wc)
 {
     this.mGuildWarCity = wc;
     if (this.mGuildWarCity == null)
     {
         return;
     }
     GuildInfo info = Globals.Instance.AttDB.GuildDict.GetInfo(this.mGuildWarCity.City.CityId);
     if (info != null)
     {
         this.mTowerName.text = info.CastleName;
         this.mTowerName.color = new Color32(255, 235, 215, 255);
         GuildWarStateInfo mWarStateInfo = Globals.Instance.Player.GuildSystem.mWarStateInfo;
         if (mWarStateInfo != null)
         {
             if (mWarStateInfo.mWarState == EGuildWarState.EGWS_Normal)
             {
                 this.OnEnterStateNormal();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_SelectFourTeam)
             {
                 this.OnEnterStateFFHalfHourBefore();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalFourPrepare)
             {
                 this.OnEnterStateFinalFourPrepare();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalFourGoing)
             {
                 this.OnEnterStateFinalFourGoing();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalFourEnd)
             {
                 this.OnEnterStateFinalFourEnd();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalPrepare)
             {
                 this.OnEnterStateFinalPrepare();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalGoing)
             {
                 this.OnEnterStateFinalGoing();
             }
             else if (mWarStateInfo.mWarState == EGuildWarState.EGWS_FinalEnd)
             {
                 this.OnEnterStateFinalEnd();
             }
         }
     }
 }