public void Add(SnackCount other) { foreach (PlayerTypes pt in other.total.Keys) { eaten[pt] += other.eaten[pt]; Eaten_All += other.eaten[pt]; total[pt] += other.total[pt]; Total_All += other.total[pt]; } }
private void UpdateSnackCountText() { if (currRoomData.MyCluster == null || currRoomData.MyCluster.SnackCount.Total_All == 0) { go_snackCount.SetActive(false); // No cluster ('cause dev), OR no Snacks? Hide snackCount. } else { go_snackCount.SetActive(true); SnackCount sc = currRoomData.MyCluster.SnackCount; t_snackCount.text = sc.Eaten(currPlayerType) + " / " + sc.Total(currPlayerType); } }