private void Awake() { if (instance == null) { instance = this; } }
public void SetRequiredTime() { float requiredTime = Requirements.GetTime(SceneManager.GetActiveScene().buildIndex - 1); string requiredTimeString = TimeTrialManager.FormatTime(requiredTime); _endScreenTimeRequirement.GetComponent <Text>().text = "Czas wymagany: " + requiredTimeString; }
private void SetRequiredTime() { float requiredTime = Requirements.GetTime(SceneManager.GetActiveScene().buildIndex - 1); string requiredTimeString = TimeTrialManager.FormatTime(requiredTime); _timeTrialRequiredTime.text = "Czas wymagany: " + requiredTimeString; }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
public void UpdateRecordsBoard() { int currentLevel = SceneManager.GetActiveScene().buildIndex - 1; RecordsData savedRecords = Save.GetCurrentLevelRecords(currentLevel); float[] playerRecords = savedRecords.GetRecords(); for (int i = 0; i < playerRecords.Length; i++) { _scoreboardTimes[i].text = TimeTrialManager.FormatTime(playerRecords[i]); } }
private void Awake() { player = GameObject.FindGameObjectWithTag("Player"); this.ToggleState(false, startVisible); timer = GameObject.Find("Timer").GetComponent <TimeTrialManager>(); if (levelEnd) { currentState = State.END; } else { currentState = State.DISABLED; } }
public void LoadPlayerRecords() { Text[][] _levelScoreBoards = new Text[3][] { _level1Scoreboard, _level2Scoreboard, _level3Scoreboard }; for (int i = 0; i < _levelScoreBoards.GetLength(0); i++) { RecordsData recordsData = Save.GetCurrentLevelRecords(i); float[] records = recordsData.GetRecords(); for (int j = 0; j < records.Length; j++) { _levelScoreBoards[i][j].text = TimeTrialManager.FormatTime(records[j]); } } }
private void SetPlayerTime() { string playerTimeString = TimeTrialManager.FormatTime(_ttm.PlayerTime); _timeTrialPlayerTime.text = "Twój czas: " + playerTimeString; }
void Start() { manager = GameObject.Find("Main Camera").GetComponent <TimeTrialManager>(); }
public void SetPlayerTime() { string playerTimeString = TimeTrialManager.FormatTime(_ttm.PlayerTime); _endScreenPlayerTime.text = "Twój czas: " + playerTimeString; }