private void OnSelectedWeaponChanged(object sender, OnSelectedWeaponChangedEventArgs e)
 {
     for (int i = 0; i < weaponsObtained.Length; i++)
     {
         if (weaponsObtained[i] != null)
         {
             if (i == e.SlotIndex)
             {
                 weaponsObtained[i].SetActive(true);
             }
             else
             {
                 weaponsObtained[i].SetActive(false);
             }
         }
     }
 }
Example #2
0
    private void OnSelectedWeaponChanged(object sender, OnSelectedWeaponChangedEventArgs e)
    {
        int slotIndex = e.SlotIndex;

        slotMarker.position = slots[slotIndex].position;
    }