public void turnObstacles()
    {
        GameObject     go = GameObject.FindGameObjectWithTag("SharedVariables");
        ShareVariables sv = go.GetComponent <ShareVariables>();

        sv.resetObstacles();
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     shared = GameObject.FindGameObjectWithTag("SharedVariables");
     sv     = shared.GetComponent <ShareVariables>();
     inst   = GameObject.FindGameObjectWithTag("Instructions");
     inst.SetActive(false);
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     sv                = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>();
     displayer         = GameObject.FindGameObjectWithTag("Result");
     scoreDisplay      = displayer.GetComponent <Text>();
     scoreDisplay.text = "";
     StartCoroutine(showResult(sv.result));
 }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        timer        = delaytimer;
        cam          = Camera.main;
        cameraHeight = 2f * cam.orthographicSize;
        cameraWidth  = cameraHeight * cam.aspect;

        shared = GameObject.FindGameObjectWithTag("SharedVariables");
        sv     = shared.GetComponent <ShareVariables>();
    }
예제 #5
0
    void OnEnable()
    {
        countdownDisplayer = GameObject.FindGameObjectWithTag("Countdown");
        text = countdownDisplayer.GetComponent <Text>();
        SceneManager.sceneLoaded += StartCountDown;
        car         = GameObject.FindGameObjectWithTag("Car");
        coinSpawner = GameObject.FindGameObjectWithTag("CoinSpawner");
        tyreSpawner = GameObject.FindGameObjectWithTag("TyreSpawner");
        fuelSpawner = GameObject.FindGameObjectWithTag("FuelSpawner");
        carSpawner  = GameObject.FindGameObjectWithTag("CarSpawner");

        source = GetComponent <AudioSource>();
        sv     = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>();
    }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        timer        = delaytimer;
        cam          = Camera.main;
        cameraHeight = 2f * cam.orthographicSize;
        cameraWidth  = cameraHeight * cam.aspect;
        Debug.Log(cameraWidth);

        shared = GameObject.FindGameObjectWithTag("SharedVariables");
        sv     = shared.GetComponent <ShareVariables>();

        foreach (GameObject tree in trees)
        {
            tree.GetComponent <EnemycarMove>().speed = treeSpeed;
        }
    }
예제 #7
0
 // Use this for initialization
 void Start()
 {
     timer  = delaytimer;
     shared = GameObject.FindGameObjectWithTag("SharedVariables");
     sv     = shared.GetComponent <ShareVariables>();
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     source = GetComponent <AudioSource>();
     sv     = GameObject.FindGameObjectWithTag("SharedVariables").GetComponent <ShareVariables>();
 }