public void EquipWeapon(InventorySlot item) { if (map.selectedUnit.equippedWeapon == (Weapon)item.item) { cursor.AttackTarget(); } else { SoundManager.instance.PlayFX(8); map.selectedUnit.equippedWeapon = null; map.selectedUnit.equippedWeapon = (Weapon)item.item; ResetEquippedWeapon(); combatPreview.gameObject.SetActive(true); combatPreview.ClearPreview(); combatPreview.FillPreview(); } }