Ejemplo n.º 1
0
    //write the time of the player
    private void writeTimes(float timer)
    {
        string timerText = FloatToStringTime(timer);

        yourTimeText.text = "YOUR TIME: " + timerText;

        RecordTimer.SetActive(timer <= LevelInfo.levelInfo.recordTime);

        StatsHandler.statsHandler.saveScoreOnLevel(StatsHandler.statsHandler.getPlayerName(), timer);

        timesText.text = StatsHandler.statsHandler.getScoreOnLevel();

        string timeToBeatText = FloatToStringTime(LevelInfo.levelInfo.recordTime);

        beatTimeText.text = "TIME TO BEAT: " + timeToBeatText;

        if (timer <= LevelInfo.levelInfo.recordTime)
        {
            StatsHandler.setTimeAchievement();
        }
    }