void OnEnable() { mainCamera = PETools.PEUtil.MainCamTransform; carTransform = SelectCar.carTransform; driverTransform = SelectCar.carDriver.transform; driver = SelectCar.carDriver; originalCarLocalPosition = carTransform.localPosition; originalCarLocalRotation = carTransform.localRotation; ready = false; speed = 0; score = 0; scoreText.text = "0m"; slideDirection = 0; barriers = new List <Barrier>(16); nextGenerateDistance = generateLength; }
void Awake() { driver = GetComponent <PathDriver>(); }