Example #1
0
    // Use this for initialization
    void Start()
    {
        motorCarreterasGO    = GameObject.Find("MotorCarretera");
        motorCarreteraScript = motorCarreterasGO.GetComponent <MotorCarreteras_GameManager_Dificil> ();

        txtTiempo.text    = "2:00";
        txtDistancia.text = "0";

        tiempo = 120;
    }
    void InicioComponentes()
    {
        motorCarreteraGO     = GameObject.Find("MotorCarretera");
        motorCarreteraScript = motorCarreteraGO.GetComponent <MotorCarreteras_GameManager_Dificil> ();

        contadorNumerosGO   = GameObject.Find("ContadorNumeros");
        contadorNumerosComp = contadorNumerosGO.GetComponent <SpriteRenderer> ();

        carroGO            = GameObject.Find("Carro");
        controladorCarroGO = GameObject.Find("ControladorCarro");

        IniciarCuentaAtras();
    }