// Use this for initialization void Start() { GameObject historyObject = GameObject.Find("History"); history = historyObject.GetComponent <History>(); placeCar(history.levelName); maxSpeed = history.getCarMaxSpeed(); minSpeed = history.getCarMinSpeed(); laneChangeSpeed = history.getLaneChangeSpeed(); fb = GameObject.FindObjectOfType <FitBoardHandler>(); curLanePos = 0; child = GameObject.Find("Car").GetComponent <Transform>(); marker = GameObject.Find("Marker").GetComponent <SpeedometerMarker>(); velocity = velocityExp; marker.updateMarker(velocityExp); moving = false; left = false; right = false; hittingSide = false; laneChangeHelp = false; laneChangeHelp2 = false; noHits = true; turnDegreeInput = 1; turnDegree = (0.0015f * Mathf.Pow(turnDegreeInput, 2)); relPos = 0; active = false; }
void Start() { collisions = 0; mover = GameObject.Find("Corvette Parent").GetComponent <Mover>(); scoreKeeper = GameObject.Find("Actual Score").GetComponent <ScoreKeeper>(); marker = GameObject.Find("Marker").GetComponent <SpeedometerMarker>(); if (mover == null) { mover = GameObject.Find("Corvette Parent").GetComponent <Mover>(); } //car = GameObject.Find("Car").GetComponent<Transform>(); failure = false; collisionSound = GameObject.Find("CollisionSounder").GetComponent <AudioSource>(); }