void OnDieSelected(UIDiscoveredDieView uidie, bool selected) { if (selected) { if (selectedDice.Count == 0) { pairSelectedDice.onClick.AddListener(PairSelectedDice); pairSelectedDice.SetActive(true); } selectedDice.Add(uidie); } else { selectedDice.Remove(uidie); if (selectedDice.Count == 0) { pairSelectedDice.onClick.RemoveListener(PairSelectedDice); pairSelectedDice.SetActive(false); } } }
void DestroyDiscoveredDie(UIDiscoveredDieView dieView) { //Debug.Log("Destroying discovered Die: " + dieView.die.name); GameObject.Destroy(dieView.gameObject); }