Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     gameManager  = FindObjectOfType <PitsGameManager>();
     selectedicon = FindObjectOfType <PitsEquippedItemController>();
     player       = FindObjectOfType <PitsPlayerController>();
     icon         = transform.GetChild(0).gameObject;
     carParked    = new Vector3(-9.2f, -2.6f, 0f);
     carExit      = new Vector3(-9.2f, -9.18f, 0f);
     gameManager.PlaySound("carenter");
 }
Exemple #2
0
    void Start()
    {
        Lives = 3;

        player  = FindObjectOfType <PitsPlayerController>();
        spawner = FindObjectOfType <PitsSpawnerController>();

        string mins = ((int)TimerControl / 60).ToString("00");
        string segs = (TimerControl % 60).ToString("00");

        TimerString    = string.Format("{00}:{01}", mins, segs);
        texttimer.text = TimerString;

        UpdateText();
    }