Пример #1
0
 private void SetPeiJiao(RemainingPlayerParameter param, string playerId)
 {
     this.m_SelfName.text = playerId;
     this.m_BonusOrPunishment1.SetSprite(StringConsts.ICON_PEI_JIAO);
     this.m_OtherName.text = PeiPlayerName(param);
     this.m_BonusOrPunishment2.gameObject.SetActive(false);
     this.m_TextBonus.text = string.Format(StringConsts.SCORING, param.MaxBouns);
     print("       <<<<<    >>>>> playerId =" + playerId);
     this.m_TextFan.text = CalculatePeiJiao(param);
     print("SetPeiJiao param.MaxBouns=" + param.MaxBouns);
 }
Пример #2
0
 public string CalculatePeiJiao(RemainingPlayerParameter param)
 {
     if (param.MaxBouns == SystemConsts.Di)
     {
         return(StringConsts.PIN_HU);
     }
     if (param.BounsTypes.Count != 0)
     {
         List <string> stringList = new List <string>();
         if (IsBonusType(param, BounsType.QingYiSe))
         {
             stringList.Add(StringConsts.QING_YI_SE);
         }
         if (IsBonusType(param, BounsType.QiDu))
         {
             stringList.Add(StringConsts.QI_DUI[BonusTypeCount(param, BounsType.Gou) + BonusTypeCount(param, BounsType.Gang)]);
         }
         if (IsBonusType(param, BounsType.DuiZiHu))
         {
             stringList.Add(StringConsts.DUI_ZI_HU);
         }
         if (IsBonusType(param, BounsType.JinGouDiao))
         {
             stringList.Add(StringConsts.JIN_GOU_DIAO);
         }
         if (IsBonusType(param, BounsType.QiangGang))
         {
             stringList.Add(StringConsts.QIANG_GANG);
         }
         if (IsBonusType(param, BounsType.GangShang))
         {
             stringList.Add(StringConsts.GANG_SHANG_HUA);
         }
         if (!IsBonusType(param, BounsType.QiDu))
         {
             int count = BonusTypeCount(param, BounsType.Gou) + BonusTypeCount(param, BounsType.Gang);
             if (count > 0)
             {
                 stringList.Add(string.Format(StringConsts.DAI_GEN_COUNT, count));
             }
         }
         return(string.Join(StringConsts.SPACING, stringList.ToArray()));
     }
     return(StringConsts.PIN_HU);
 }
Пример #3
0
 public void SetPunishmentParameter(RemainingPlayerParameter param, string selfPlayerID)
 {
     gameObject.SetActive(true);
     this.SetPeiJiao(param, selfPlayerID);
 }
Пример #4
0
 public int BonusTypeCount(RemainingPlayerParameter param, BounsType bounsType)
 {
     return(param.BounsTypes.Count(a => a == bounsType));
 }
Пример #5
0
 public bool IsBonusType(RemainingPlayerParameter param, BounsType bounsType)
 {
     return(param.BounsTypes.Contains(bounsType));
 }
Пример #6
0
 public string PeiPlayerName(RemainingPlayerParameter param)
 {
     return(string.Format(StringConsts.PEI_JIA, param.PlayerId));
 }