Пример #1
0
    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();
    }
Пример #2
0
    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();
    }