Example #1
0
 // Use this for initialization
 void Start()
 {
     laneProperties = GameObject.FindWithTag("GameController")
                      .GetComponent <LaneProperties>();
     z = gameObject.transform.localPosition.z;
     r = gameObject.GetComponent <Rigidbody>();
 }
 // Use this for initialization
 void Start()
 {
     laneProperties =
         GameObject.FindWithTag("GameController")
         .GetComponent <LaneProperties>();
     renderers = gameObject.GetComponentsInChildren <Renderer>();
 }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     laneProperties     = gameObject.GetComponent <LaneProperties>();
     motorwayManager    = GameObject.FindWithTag("MotorwayManager");
     motorwayStats      = motorwayManager.GetComponent <MotorwayStats>();
     motorwayParameters = motorwayManager.GetComponent <Parameters>();
     motorwayTiming     = motorwayManager.GetComponent <MotorwayTiming>();
 }
Example #4
0
    // Use this for initialization
    void Start()
    {
        audioSource = gameObject.GetComponent <AudioSource>();

        lifeManager = GameObject.FindWithTag("GameController")
                      .GetComponent <LifeManager>();
        laneProperties = GameObject.FindWithTag("GameController")
                         .GetComponent <LaneProperties>();

        defaultShader = dinosaur.GetComponent <Renderer>().material.shader;
    }
Example #5
0
    // Use this for initialization
    void Start()
    {
        threshold = 0.7f;

        laneProperties = GameObject.FindWithTag("GameController")
                         .GetComponent <LaneProperties>();

        tutorialTextManager = GameObject.FindWithTag("GameController")
                              .GetComponent <TutorialTextManager>();

        StartCoroutine(obstacleSpawner());
    }
    // Start is called before the first frame update
    void Start()
    {
        motorwayManager   = GameObject.FindWithTag("MotorwayManager");
        parameters        = motorwayManager.GetComponent <Parameters>();
        vehicleProperties = gameObject.GetComponent <VehicleProperties>();
        neighbours        = gameObject.GetComponent <Neighbours>();
        laneProperties    = motorwayManager.GetComponent <LaneProperties>();
        vehicleMovement   = gameObject.GetComponent <VehicleMovement>();
        vehicles          = motorwayManager.GetComponent <Vehicles>();
        lanes             = motorwayManager.GetComponent <Lanes>();

        StartCoroutine(DoEveryX());
    }
    // Use this for initialization
    void Start()
    {
        lives = defaultLives;
        UpdateIndicator();

        spawner = GameObject.FindWithTag("Spawner")
                  .GetComponent <Spawner>();

        scoreManager = GameObject.FindWithTag("GameController")
                       .GetComponent <ScoreManager>();

        laneProperties = GameObject.FindWithTag("GameController")
                         .GetComponent <LaneProperties>();

        tutorialTextManager = GameObject.FindWithTag("GameController")
                              .GetComponent <TutorialTextManager>();

        playerCollision = dinosaur.GetComponent <PlayerCollision>();

        rectTrans = lifeIndicator.GetComponent <RectTransform>();
    }
 // Use this for initialization
 void Start()
 {
     laneProperties = GameObject.FindWithTag("GameController")
                      .GetComponent <LaneProperties>();
     startingX = gameObject.transform.position.x;
 }