コード例 #1
0
 public void SetWeaponValues()
 {
     for (int i = 0; i < EquipWeapon.WeaponList.Count; i++)
     {
         if (InventoryButtonsIcons[CurrentInventoryItemSlot].sprite.name == EquipWeapon.WeaponList[i].WeaponName &&
             Stats.PlayerLevel >= EquipWeapon.WeaponList[i].LevelRank)
         {
             if (EquipWeapon.WeaponList[i].IsASecondaryWeapon == 0 && movement.Attacking == false)
             {
                 InventoryButtonRects[CurrentInventoryItemSlot].transform.GetComponent <Image>().color = new Color(0.7f, 0.7f, 0.7f, 0.66f);
                 if (SwitchWeapons.CurrentWeaponItemSlot != -1)
                 {
                     InventoryButtonRects[SwitchWeapons.CurrentWeaponItemSlot].transform.GetComponent <Image>().color = new Color(1, 1, 1, 0.66f);
                 }
             }
             SwitchWeapons.StartCoroutine(SwitchWeapons.WepSwitch(CurrentInventoryItemSlot));
         }
     }
 }