// Use this for initialization void Start() { myRoadFollower = this.GetComponent <NewRoadFollower> (); rb = this.GetComponent <Rigidbody2D> (); carContainer = boot.GetComponent <Container> (); maxHealth = carHealth; originalMass = rb.mass; originalDrag = rb.drag; originalAngularDrag = rb.angularVelocity; enterIcon = driversDoor.AddComponent <SpriteRenderer> (); enterIcon.sortingOrder = 99; if (playerCar == true) { enterIcon.sprite = CommonObjectsStore.me.keyIcon; } else { enterIcon.sprite = CommonObjectsStore.me.hotwireIcon; } enterIcon.enabled = false; }
// Use this for initialization void Start() { myRF = this.GetComponent <NewRoadFollower> (); myPCC = this.GetComponent <PlayerCarController> (); spawnTimer = Random.Range(5.0f, 10.0f); }