예제 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #2
0
    public void SetRequiredTime()
    {
        float  requiredTime       = Requirements.GetTime(SceneManager.GetActiveScene().buildIndex - 1);
        string requiredTimeString = TimeTrialManager.FormatTime(requiredTime);

        _endScreenTimeRequirement.GetComponent <Text>().text = "Czas wymagany: " + requiredTimeString;
    }
예제 #3
0
    private void SetRequiredTime()
    {
        float  requiredTime       = Requirements.GetTime(SceneManager.GetActiveScene().buildIndex - 1);
        string requiredTimeString = TimeTrialManager.FormatTime(requiredTime);

        _timeTrialRequiredTime.text = "Czas wymagany: " + requiredTimeString;
    }
예제 #4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
예제 #5
0
    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]);
        }
    }
예제 #6
0
    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;
        }
    }
예제 #7
0
    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]);
            }
        }
    }
예제 #8
0
    private void SetPlayerTime()
    {
        string playerTimeString = TimeTrialManager.FormatTime(_ttm.PlayerTime);

        _timeTrialPlayerTime.text = "Twój czas: " + playerTimeString;
    }
예제 #9
0
 void Start()
 {
     manager = GameObject.Find("Main Camera").GetComponent <TimeTrialManager>();
 }
예제 #10
0
    public void SetPlayerTime()
    {
        string playerTimeString = TimeTrialManager.FormatTime(_ttm.PlayerTime);

        _endScreenPlayerTime.text = "Twój czas: " + playerTimeString;
    }