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