public void ShowHUDPortalStars(Portal portal) { GameObject portalStar = portal.starRequiredPrefab; Star star = portalStar.GetComponent <Star>(); Color starColor = star.GetColor(); int starCount = starsCollected[(int)star.starType]; hudOverlay.SetStars(starColor, starCount); hudOverlay.SlideIn(); }
public void ShowHUDDoorStars(Door door) { GameObject[] doorStars = door.starsRequiredPrefabs; Color[] starColors = new Color[doorStars.Length]; int[] starCounts = new int[doorStars.Length]; for (int i = 0; i < doorStars.Length; i++) { Star star = doorStars[i].GetComponent <Star>(); starColors[i] = star.GetColor(); starCounts[i] = starsCollected[(int)star.starType]; } hudOverlay.SetStars(starColors, starCounts); hudOverlay.SlideIn(); }