Esempio n. 1
0
    void UIPlanetIcon_OnClick(PlanetName planet)
    {
        bool   collected = PlanetTray.Instance[planet].Collected;
        string location  = "Location:\n\n" + TriviaManager.Instance[planet].location_hint;

        PopupPanel.Instance.Show(planet.ToString(), collected ? PlanetInfo.Info[planet] : location, collected ? PlanetInfo.Colors[planet] : Color.grey);
    }
Esempio n. 2
0
    public void Show(PlanetName planet)
    {
        currentPlanet = planet;
        currentTrivia = TriviaManager.Instance[planet];

        questionText.text = currentTrivia.question;
        titleText.text    = planet.ToString();
        titleAccent.color = PlanetInfo.Colors[planet];

        for (int i = 0; i < answerList.Count; i++)
        {
            UIAnswerElement element = answerList[i];
            element.SetInfo(currentTrivia.answers[i], PlanetInfo.Colors[planet]);
        }

        SetVisibility(true);
    }
Esempio n. 3
0
 public static Sprite GetOutlineSprite(PlanetName planet)
 {
     return(Resources.Load <Sprite>("Images/Planets/Outline" + planet.ToString()));
 }
Esempio n. 4
0
 public static Sprite GetCollectedSprite(PlanetName planet)
 {
     return(Resources.Load <Sprite>("Images/Planets/" + planet.ToString()));
 }