public bool ChangeArmor(string[] armorStr) { ArmorType type; if (armorStr.Length == 0 || !Enum.TryParse <ArmorType>(armorStr[0], true, out type)) { Debug.LogError("Couldn't pickup 'armor' as there are no parameters or they cannot be parsed."); return(false); } bool pickupAcquired = healthController.ChangeArmor(type); if (pickupAcquired) { GlobalLevelVariables.instanceOf.PickupAcquired(); } if (pickupAcquired) { infoSection.SetMessage("Picked up the armor."); colorOverlay.SetColor(pickupScreenColor, .25f, .25f, .25f, 1); } return(pickupAcquired); }