Beispiel #1
0
 /// <summary>
 /// 更新属性
 /// </summary>
 private void updateAttrChanges()
 {
     AttrChange[] attrs     = magicWeapon.getAttrChanges();
     AttrChange[] nextattrs = magicWeapon.getNextAttrChanges();
     for (int n = 0; n < sttrPonts.Length; n++)
     {
         sttrPonts[n].SetActive(false);
     }
     int[] index = new int[attrs.Length];
     if (attrs.Length == 1)
     {
         index[0] = 1;
     }
     else if (attrs.Length == 2)
     {
         index[0] = 1;
         index[1] = 2;
     }
     else if (attrs.Length == 3)
     {
         index[0] = 0;
         index[1] = 1;
         index[2] = 2;
     }
     else if (attrs.Length == 4)
     {
         index[0] = 0;
         index[1] = 1;
         index[2] = 2;
         index[3] = 3;
     }
     for (int j = 0; j < index.Length; j++)
     {
         for (int m = 0; m < sttrPonts.Length; m++)
         {
             if (m == index[j])
             {
                 sttrPonts[m].SetActive(true);
                 sttrDec[m].spriteName = updateSprieName(attrs[j]);
                 sttrVel[m].text       = attrs[j].num.ToString();
                 if (magicWeapon.getStrengLv() >= magicWeapon.getMaxStrengLv())
                 {
                     addVel[m].text = "";
                 }
                 else
                 {
                     addVel[m].text = "+" + nextattrs[j].num.ToString();
                 }
             }
         }
     }
 }