예제 #1
0
    public void gameOverUI()
    {
        hud.displayGameOver(true);
        if (scoreH != null)
        {
            ScoreHandler sH          = scoreH.GetComponent <ScoreHandler>();
            int          moneyGained = sH.calculateGainedMoney();
            IO.setMoney(IO.getMoney() + moneyGained);

            sH.printScore();
            int correct = sH.amount_Large + sH.amount_Small + sH.amount_Package;
            if (gameOverTimeRanOut)
            {
                hud.setTextScoreTitle("Time ran out!");
            }
            else
            {
                hud.setTextScoreTitle("Workday over");
            }
            hud.setTextScoreTime(timer.getPrettyTimeLeft());
            hud.setTextScorePorto(sH.amount_Porto.ToString());
            hud.setTextScorePostCorrect(correct.ToString());
            hud.setTextScorePostWrong(sH.amount_Wrong.ToString());
            hud.setTextScoreStampedCorrect(sH.amount_Stamped.ToString());
            hud.setTextScoreStampedWrong(sH.amount_notStamped.ToString());
            hud.setTextScoreMoney("$" + moneyGained.ToString());
        }
    }