public void Show(float goalAmount, float scoreAmount, float amountFromJobs) { retireText.UpdateText(goalAmount); scoreText.UpdateText(scoreAmount); earnedFromjobsText.UpdateText(amountFromJobs); earnedFromInvestingText.UpdateText(scoreAmount - amountFromJobs); if (scoreAmount >= goalAmount) { resultText.UpdateText("You Win!"); } else { resultText.UpdateText("You lost."); } gameObject.SetActive(true); }
private void Start() { scoreSystem = FindObjectOfType <ScoreSystem>(); int currentScore = -1; if (scoreSystem != null) { currentScore = scoreSystem.Score; } ranking.AddEntry(GetCurrentName(), currentScore); scoreText.UpdateText(currentScore); nameText.UpdateText(GetCurrentName()); }
public void UpdateTotalYearsText(int totalYears) { totalYearText.UpdateText(totalYears); }
public void UpdateCurrentYear(int currentYear, int currentCompound) { yearText.UpdateText(string.Format("{0} {1}", currentYear, GameUtils.GetMonthFromInteger(currentCompound + 1))); }
public void UpdateNetWorthText(float netWorth) { netWorthText.UpdateText(netWorth.ToString("N2")); }
public void UpdateCashText(float cash) { cashText.UpdateText(cash.ToString("N2")); }