示例#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);
    }
示例#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);
    }
示例#3
0
 public static Sprite GetOutlineSprite(PlanetName planet)
 {
     return(Resources.Load <Sprite>("Images/Planets/Outline" + planet.ToString()));
 }
示例#4
0
 public static Sprite GetCollectedSprite(PlanetName planet)
 {
     return(Resources.Load <Sprite>("Images/Planets/" + planet.ToString()));
 }