public void ShowPotentialItem(GameObject item) { PowerupMain main = item.GetComponent <PowerupMain>(); PowerupAttachable attach = item.GetComponent <PowerupAttachable>(); StatPack pack = item.GetComponent <PowerupStats>().GetPack(); PowerupAttachable otherItem; StatPack otherPack; if (main.IsEquipped()) { return; } if (attach.isWeapon) { otherItem = controller.GetCar().GetComponent <PowerupManager>().GetWeapon(attach.weaponLocation); damageSliders.ShowPotentialWeapon(attach); } else { otherItem = controller.GetCar().GetComponent <PowerupManager>().GetMod(attach.modLocation); } if (otherItem == null) { otherPack = new StatPack(); } else { otherPack = otherItem.GetComponent <PowerupStats>().GetPack(); } ShowStatBars(pack, otherPack); }