示例#1
0
    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);
    }
示例#2
0
    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());
    }
示例#3
0
 public void UpdateTotalYearsText(int totalYears)
 {
     totalYearText.UpdateText(totalYears);
 }
示例#4
0
 public void UpdateCurrentYear(int currentYear, int currentCompound)
 {
     yearText.UpdateText(string.Format("{0} {1}", currentYear, GameUtils.GetMonthFromInteger(currentCompound + 1)));
 }
示例#5
0
 public void UpdateNetWorthText(float netWorth)
 {
     netWorthText.UpdateText(netWorth.ToString("N2"));
 }
示例#6
0
 public void UpdateCashText(float cash)
 {
     cashText.UpdateText(cash.ToString("N2"));
 }