public void ShowNotification(string message, Globals.Conviction conviction, int step = 0) { // Debug.Log("Notifying " + message); SetVisible(notification, true); Color color = GameModel.GetConvictionColor(conviction); notification.GetComponentInChildren <Text>().color = color; notification.GetComponentInChildren <Text>().text = message; StartCoroutine(SetVisibleDelayed(notification, false, NOTIFICATION_DELAY)); }
public void DebugIncrementCurrProg() { Globals.Conviction conviction = (Globals.Conviction)_filter.value; Quest lastestClue = GetLatestConvictionClue(conviction); Globals.IncrementProgress(conviction); if (Globals.GetConvictionProgress(conviction) > totalStep) { Globals.SetConvictionProgress(conviction); } DisplayEmail(); }
public void DisplayEmail() { Globals.Conviction conviction = (Globals.Conviction)_filter.value; Quest lastestClue = GetLatestConvictionClue(conviction); if (lastestClue != null) { _filter.captionText.text = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(conviction.ToString()) + " (" + lastestClue.step + "/" + totalStep + ")"; header.text = lastestClue.header; content.text = lastestClue.content; } else { _filter.captionText.text = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(conviction.ToString()) + " (0/" + totalStep + ")"; header.text = "No quest"; content.text = "No quest"; } }
Quest GetLatestConvictionClue(Globals.Conviction conviction) { Quest latestClue = null; int step = Globals.GetConvictionProgress(conviction); switch (conviction) { case Globals.Conviction.anger: latestClue = questsAnger.Find(obj => obj.step == step); totalStep = questsAnger.Count; break; case Globals.Conviction.envy: latestClue = questsEnvy.Find(obj => obj.step == step); totalStep = questsEnvy.Count; break; case Globals.Conviction.gluttony: latestClue = questsGluttony.Find(obj => obj.step == step); totalStep = questsGluttony.Count; break; case Globals.Conviction.greed: latestClue = questsGreed.Find(obj => obj.step == step); totalStep = questsGreed.Count; break; case Globals.Conviction.lust: latestClue = questsLust.Find(obj => obj.step == step); totalStep = questsLust.Count; break; case Globals.Conviction.pride: latestClue = questsPride.Find(obj => obj.step == step); totalStep = questsPride.Count; break; case Globals.Conviction.sloth: latestClue = questsSloth.Find(obj => obj.step == step); totalStep = questsSloth.Count; break; } return(latestClue); }
public static Color GetConvictionColor(Globals.Conviction conviction) { Color color = Color.white; switch (conviction) { case Globals.Conviction.anger: color = GetMoodColor(Globals.Mood.lustful); break; case Globals.Conviction.envy: color = GetMoodColor(Globals.Mood.obsessed); break; case Globals.Conviction.gluttony: color = GetMoodColor(Globals.Mood.bitter); break; case Globals.Conviction.greed: color = GetMoodColor(Globals.Mood.idealistic); break; case Globals.Conviction.lust: color = Color.blue; break; case Globals.Conviction.pride: color = GetMoodColor(Globals.Mood.conservative); break; case Globals.Conviction.sloth: color = GetMoodColor(Globals.Mood.lovestruck); // Debug.Log(color); break; } // Debug.Log("getting color " + color + " for conviction " + conviction.ToString()); return(color); }