void Awake() { if (GetComponent <Car_Controller>()) { car_controller = GetComponent <Car_Controller>(); } if (GetComponent <Motorbike_Controller>()) { bike_controller = GetComponent <Motorbike_Controller>(); } }
void Start() { if (GetComponent <Car_Controller>()) { controller = GetComponent <Car_Controller>(); } stats = GetComponent <Statistics>(); rigid = GetComponent <Rigidbody>(); countedLastDrift = true; driftMultiplier = 1; lastMultiply = multiplyRate; }
void Start() { if (GetComponent <Car_Controller>()) { carController = GetComponent <Car_Controller>(); } if (GetComponent <Motorbike_Controller>()) { motorbikeController = GetComponent <Motorbike_Controller>(); if (motorbikeController.chassis) { motorbikeChassis = motorbikeController.chassis.transform; } } CurrentFrame = 0; }
void Awake() { animator = GetComponent <Animator>(); if (transform.root.GetComponent <Car_Controller>()) { car_controller = transform.root.GetComponent <Car_Controller>(); } if (transform.root.GetComponent <Motorbike_Controller>()) { bike_controller = transform.root.GetComponent <Motorbike_Controller>(); } if (driverLookTarget) { initialDriverLookX = driverLookTarget.localPosition.x; } }
void Awake() { if (GetComponent <Statistics>()) { stats = GetComponent <Statistics>(); } if (GetComponent <Car_Controller>()) { car_controller = GetComponent <Car_Controller>(); } if (GetComponent <Motorbike_Controller>()) { bike_controller = GetComponent <Motorbike_Controller>(); } randomValue = Random.value * 100; }