void endRaceDataCheck(int _place, float _timeRace, float _timeBestLap) { ProgressDataManager progressDataMgrTmp = progressDataObj.GetComponent <ProgressDataManager>(); recordTextBestLapEverFL = progressDataMgrTmp.checkLapRecordEver(_timeBestLap); //true if new record, false if not recordTextBestLapLvlFL = progressDataMgrTmp.checkLapRecordThisLvlPlayerData(_timeBestLap); //true if new record, false if not recordTextBestRaceLvlFL = progressDataMgrTmp.checkRaceRecordThisLvlPlayerData(_timeRace); //true if new record, false if not recordTextBestRaceFoeFL = progressDataMgrTmp.checkRaceRecordNrOppPlayerData(_timeRace); //true if new record, false if not Text nextBtnTextTmp = nextBtnTextObj.GetComponent <Text>(); if (progressDataMgrTmp.endRace(_place)) { nextBtnTextTmp.text = "Unlock Next"; nextBtnTextTmp.fontSize = 44; restartBtnObj.SetActive(false); int tmpNrNewLvl = progressDataMgrTmp.getPlayerData().getMaxLvl(); if (tmpNrNewLvl > 10 && (tmpNrNewLvl - 1) % 10 == 0) { showAnimationInformationFL = true; } } else { nextBtnTextTmp.text = "End"; nextBtnTextTmp.fontSize = 50; restartBtnObj.SetActive(true); }; }
void Start() { progressData = progressDataObj.GetComponent <ProgressDataManager>(); playerData = progressData.getPlayerData(); textEngineLvl = textEngineLvlObj.GetComponent <Text>(); textEngineMoney = textEngineMoneyObj.GetComponent <Text>(); textMassLvl = textMassLvlObj.GetComponent <Text>(); textMassMoney = textMassMoneyObj.GetComponent <Text>(); }