private bool IsItemEquipped() { switch (item.GetHackerOrRunner()) { case Item.HackerRunner.Runner: Loadout runnerLoadout = FindObjectOfType <PlayerData>().GetCurrentRunner().GetLoadout(); RunnerMod currentMod = item as RunnerMod; return(runnerLoadout.IsItemEquipped(currentMod)); case Item.HackerRunner.Hacker: // TODO: FILL THIS SHIT IN FOR HACKER HackerLoadout hackerLoadout = FindObjectOfType <PlayerData>().GetCurrentHacker().GetHackerLoadout(); return(hackerLoadout.IsItemEquipped(item)); } return(false); }
private void EnableOrDisableEquipButtonBasedOnSelection() { if (selectedItem == null) { runnerEquipButton.interactable = false; hackerEquipButton.interactable = false; } else { switch (selectedItem.GetHackerOrRunner()) { case Item.HackerRunner.Runner: Loadout runnerLoadout = FindObjectOfType <PlayerData>().GetCurrentRunner().GetLoadout(); RunnerMod mod = selectedItem as RunnerMod; if (runnerLoadout.IsItemEquipped(mod)) { runnerEquipButton.interactable = false; } else { runnerEquipButton.interactable = true; } break; case Item.HackerRunner.Hacker: HackerLoadout hackerLoadout = FindObjectOfType <PlayerData>().GetCurrentHacker().GetHackerLoadout(); if (hackerLoadout.IsItemEquipped(selectedItem)) { hackerEquipButton.interactable = false; } else { hackerEquipButton.interactable = true; } break; } } }