Пример #1
0
 // Update is called once per frame
 void Update()
 {
     for (int i = 0; i < 6; i++)
     {
         BattlePoints[i] = CManager.GetPlayerBattlePoint(i + 1) + CManager.GetPlayerCost(i + 1).critical + CManager.GetPlayerCost(i + 1).crush + CManager.GetPlayerCost(i + 1).rank;
         int ThousandPlace = (BattlePoints[i] / 1000) % 10; //100の位
         int HundredPlace  = (BattlePoints[i] / 100) % 10;  //100の位
         int TenPlace      = (BattlePoints[i] / 10) % 10;   //10の位
         int Digit         = BattlePoints[i] % 10;          //1の位
         Debug.Log("位確認" + ThousandPlace.ToString() + HundredPlace.ToString() + TenPlace.ToString() + Digit.ToString());
         Debug.Log(CManager.GetPlayerCost(1).rank);
         for (int j = 0; j < 10; j++)
         {
             if (Digit == j)
             {
                 if (i < 3)
                 {
                     PannelDigit[i].texture = Images[j];                 //左右判定
                 }
                 else
                 {
                     PannelDigit[i].texture = Images[j + 10];
                 }
             }
             //10の位
             if (TenPlace == j)
             {
                 if (ThousandPlace == 0)
                 {
                     if (HundredPlace == 0)
                     {
                         if (TenPlace != 0)
                         {
                             if (i < 3)
                             {
                                 PannelTenPlace[i].texture = Images[j];          //左右判定
                             }
                             else
                             {
                                 PannelTenPlace[i].texture = Images[j + 10];
                             }
                             ColsetTen(i);
                         }
                     }
                     else
                     {
                         if (i < 3)
                         {
                             PannelTenPlace[i].texture = Images[j];          //左右判定
                         }
                         else
                         {
                             PannelTenPlace[i].texture = Images[j + 10];
                         }
                         ColsetTen(i);
                     }
                 }
                 else
                 {
                     if (i < 3)
                     {
                         PannelTenPlace[i].texture = Images[j];          //左右判定
                     }
                     else
                     {
                         PannelTenPlace[i].texture = Images[j + 10];
                     }
                     ColsetTen(i);
                 }
             }
             //100の位
             if (HundredPlace == j)
             {
                 if (ThousandPlace == 0)
                 {
                     if (HundredPlace != 0)
                     {
                         if (i < 3)
                         {
                             PannelHundredPlace[i].texture = Images[j];          //左右判定
                         }
                         else
                         {
                             PannelHundredPlace[i].texture = Images[j + 10];
                         }
                         ColsetHundred(i);
                     }
                 }
                 else
                 {
                     if (i < 3)
                     {
                         PannelHundredPlace[i].texture = Images[j];          //左右判定
                     }
                     else
                     {
                         PannelHundredPlace[i].texture = Images[j + 10];
                     }
                     ColsetHundred(i);
                 }
             }
             //1000
             if (ThousandPlace != 0 && ThousandPlace == j)
             {
                 if (i < 3)
                 {
                     PannelThousandPlace[i].texture = Images[j];          //左右判定
                 }
                 else
                 {
                     PannelThousandPlace[i].texture = Images[j + 10];
                 }
                 ColsetThousand(i);
             }
         }
     }
 }