Ejemplo n.º 1
0
 public void InitWithBaseScene(EGuildWarId warID)
 {
     this.mWarID = warID;
     this.CreateObjects();
     this.SupportTeamId = EGuildWarTeamId.EGWTI_None;
 }
Ejemplo n.º 2
0
 public void Refresh()
 {
     List<GuildWarClientSupportInfo> battleSupportInfo = Globals.Instance.Player.GuildSystem.BattleSupportInfo;
     if (battleSupportInfo == null)
     {
         return;
     }
     for (int i = 0; i < battleSupportInfo.Count; i++)
     {
         GuildWarClientSupportInfo guildWarClientSupportInfo = battleSupportInfo[i];
         if (guildWarClientSupportInfo != null)
         {
             if (guildWarClientSupportInfo.WarID == this.mWarID)
             {
                 this.mSb.Remove(0, this.mSb.Length).Append(Singleton<StringManager>.Instance.GetString("craftYZ1")).Append("  ").Append(this.FormatPerCent(guildWarClientSupportInfo.Red.LossPerCent)).Append(" : ").Append(this.FormatPerCent(guildWarClientSupportInfo.Blue.LossPerCent));
                 this.mPeiLvTxt.text = this.mSb.ToString();
                 ulong iD = Globals.Instance.Player.GuildSystem.Guild.ID;
                 this.mTeamName1.text = guildWarClientSupportInfo.Red.GuildName;
                 this.mTeamName1.color = ((iD != guildWarClientSupportInfo.Red.GuildID) ? Color.white : Color.green);
                 this.mTeamName2.text = guildWarClientSupportInfo.Blue.GuildName;
                 this.mTeamName2.color = ((iD != guildWarClientSupportInfo.Blue.GuildID) ? Color.white : Color.green);
                 this.mSb.Remove(0, this.mSb.Length).Append(Singleton<StringManager>.Instance.GetString("craftYZ2")).Append(guildWarClientSupportInfo.Red.Diamond);
                 this.mZhiChiNum1.text = this.mSb.ToString();
                 this.mSb.Remove(0, this.mSb.Length).Append(Singleton<StringManager>.Instance.GetString("craftYZ2")).Append(guildWarClientSupportInfo.Blue.Diamond);
                 this.mZhiChiNum2.text = this.mSb.ToString();
                 if (guildWarClientSupportInfo.SupportTeamID == EGuildWarTeamId.EGWTI_Red || guildWarClientSupportInfo.SupportTeamID == EGuildWarTeamId.EGWTI_Blue)
                 {
                     this.mXZBtn.isEnabled = false;
                     Tools.SetButtonState(this.mXZBtn.gameObject, false);
                     this.mGUICraftYZSliderNumber.Editable = false;
                     this.mGUICraftYZSliderNumber.Number = guildWarClientSupportInfo.SupportDiamond;
                     this.SupportTeamId = guildWarClientSupportInfo.SupportTeamID;
                 }
                 else
                 {
                     this.mXZBtn.isEnabled = true;
                     Tools.SetButtonState(this.mXZBtn.gameObject, true);
                     this.mGUICraftYZSliderNumber.Editable = true;
                     this.mGUICraftYZSliderNumber.Number = this.mGUICraftYZSliderNumber.Minimum;
                 }
                 break;
             }
         }
     }
 }
Ejemplo n.º 3
0
 private void DoSelectTeam(EGuildWarTeamId whichTeam)
 {
     List<GuildWarClientSupportInfo> battleSupportInfo = Globals.Instance.Player.GuildSystem.BattleSupportInfo;
     if (battleSupportInfo == null)
     {
         return;
     }
     for (int i = 0; i < battleSupportInfo.Count; i++)
     {
         GuildWarClientSupportInfo guildWarClientSupportInfo = battleSupportInfo[i];
         if (guildWarClientSupportInfo != null)
         {
             if (guildWarClientSupportInfo.WarID == this.mWarID)
             {
                 if (guildWarClientSupportInfo.SupportTeamID == EGuildWarTeamId.EGWTI_Red || guildWarClientSupportInfo.SupportTeamID == EGuildWarTeamId.EGWTI_Blue)
                 {
                     GameUIManager.mInstance.ShowMessageTip("EGR", 124);
                 }
                 else
                 {
                     this.SupportTeamId = whichTeam;
                 }
                 break;
             }
         }
     }
 }