Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        boar = GameObject.FindGameObjectWithTag("Boar").GetComponent <Boar>();
        if (!boar)
        {
            Debug.Log("BOAR IS NULL");
        }
        endRace = GameObject.FindGameObjectWithTag("SceneTrigger").GetComponent <EndRace>();
        if (!endRace)
        {
            Debug.Log("END TRIGGER IS NULL");
        }

        countDownTimeRemaining = countDownTime;
    }
Exemple #2
0
    // Start is called before the first frame update
    void Start()
    {
        boar = GameObject.FindGameObjectWithTag("Boar").GetComponent <Boar>();
        if (!boar)
        {
            Debug.Log("BOAR IS NULL");
        }
        endRace = GameObject.FindGameObjectWithTag("SceneTrigger").GetComponent <EndRace>();
        if (!endRace)
        {
            Debug.Log("END TRIGGER IS NULL");
        }

        countDownTimeRemaining = countDownTime;
        secondsTimeRemaining   = Mathf.FloorToInt(raceTime % 60);
        minutesTimeRemaining   = Mathf.FloorToInt(raceTime / 60);
    }